!function(){"use strict";(e=>{var i,n;null!==(i=(n=window.marfeel.config).experiences)&&void 0!==i||(n.experiences={}),Object.assign(window.marfeel.config.experiences,{preflight:e})})({"active":false,"preflight":{}})}(); var e,t,r,n,i={539:(e,t,r)=>{r.d(t,{C:()=>i});var n=r(796);const i=e=>{void 0!==document.addEventListener&&void 0!==document.hidden&&document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&e()})),window.addEventListener("pagehide",(()=>{e()}),{capture:!0}),n.TK&&addEventListener("beforeunload",e,!0)}},796:(e,t,r)=>{r.d(t,{RX:()=>i,jn:()=>o,TK:()=>n});const n="undefined"!=typeof window&&/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent)&&((e=window.navigator.userAgent)=>{const t=function(e,t){const r=(e||window.navigator.userAgent).match(/version\/(\d+(\.\d+)?)/i);return r&&r.length>1&&r[1]||""}(e),r=parseInt(t.split(".")[0],10);return!isNaN(r)&&r})()<13,i=(()=>{try{return"keepalive"in new Request("https://www.google.com/")}catch(e){return!1}})(),o="undefined"!=typeof window&&void 0!==window.navigator.sendBeacon},595:(e,t,r)=>{r.d(t,{N:()=>u});const n={childList:!0,subtree:!0};let i,o=[];const a=[],s=e=>{a.forEach((t=>{t(e)}))};function c(e){return new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&e(t.target)}))}))}const u=(e,t=document.body)=>{const r=t===document.body;if(e){const l=((e,t)=>{let r;return function(...t){clearTimeout(r),r=setTimeout((()=>{e(...t)}),400)}})(e);if("undefined"!=typeof MutationObserver)if(r)u=()=>{l(document.body)},a.push(u),i||(i=c(s),i.observe(document.body,n));else{const e=c(l);o.push(e),e.observe(t,n)}}var u}},160:(e,t)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var n,i="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,a="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",s=null,c=function(e){var t="invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(e),"\n");if(null===e||"object"!==r(e))throw new Error(t);if(1===Object.keys(e).length&&"boolean"==typeof e.advancedFraudSignals)return e;throw new Error(t)},u=!1,l=function(){for(var e=arguments.length,t=new Array(e),r=0;r element.");return n.appendChild(r),r}(c)),r.addEventListener("load",(function(){window.Stripe?e(window.Stripe):t(new Error("Stripe.js not available"))})),r.addEventListener("error",(function(){t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else e(null)}))),s).then((function(e){return function(e,t,r){if(null===e)return null;var n=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"2.1.11",startTime:t})}(n,r),n}(e,t,l)}))};l.setLoadParameters=function(e){if(u&&n){var t=c(e);if(Object.keys(t).reduce((function(t,r){var i;return t&&e[r]===(null===(i=n)||void 0===i?void 0:i[r])}),!0))return}if(u)throw new Error("You cannot change load parameters after calling loadStripe");n=c(e)},t.loadStripe=l},136:(e,t,r)=>{e.exports=r(160)},837:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(601),i=r.n(n),o=r(609),a=r.n(o)()(i());a.push([e.id,'#didomi-host .didomi-buttons{position:relative}#didomi-host .didomi-buttons:not(.mrf-pay-loaded) button{visibility:hidden}#didomi-host .didomi-buttons:not(.mrf-pay-loaded) button{pointer-events:none}#didomi-host .didomi-buttons:not(.mrf-pay-loaded) button span{visibility:hidden;opacity:0}#didomi-host .didomi-buttons:not(.mrf-pay-loaded) .mrf-pay{visibility:hidden}#didomi-host .didomi-buttons:not(.mrf-pay-loaded)::after{content:"";position:absolute;width:16px;height:16px;top:0;left:0;right:0;bottom:0;margin:auto;border:4px solid rgba(0,0,0,0);border-top-color:#fff;border-top-color:var(--mrf-pay-loader-color);border-radius:50%;animation:button-loading-spinner 1s ease infinite;visibility:visible}#didomi-host .didomi-buttons.mrf-pay-loaded{flex-direction:column !important;gap:6px}#didomi-host .didomi-buttons.mrf-pay-loaded button{width:280px;height:50px;margin-right:0}@media screen and (max-width: 480px){#didomi-host .didomi-buttons.mrf-pay-loaded button{margin-bottom:0 !important}}#didomi-host .didomi-buttons.mrf-pay-loaded .mrf-pay{width:100%;display:flex;flex-direction:column;gap:10px;font-size:12px;line-height:12px;margin-top:6px;align-items:center}#didomi-host .didomi-buttons.mrf-pay-loaded .mrf-pay__btn{border-radius:3px;border:1px solid #343b44 !important;background:#fff;box-shadow:0px 4px 8.3px 0px rgba(0,0,0,.25);box-sizing:border-box;text-align:center}#didomi-host .didomi-buttons.mrf-pay-loaded .mrf-pay__btn-info{color:#343b44;font-size:14px !important;font-weight:600;line-height:14px;letter-spacing:.3px;margin-bottom:6px !important;text-align:inherit !important}#didomi-host .didomi-buttons.mrf-pay-loaded .mrf-pay__btn-details{color:#343b44;font-weight:500 !important;font-size:12px !important;line-height:13px;letter-spacing:.3px;display:flex;gap:10px;justify-content:center;align-items:center}#didomi-host .didomi-buttons.mrf-pay-loaded .mrf-pay__btn-details-logo{height:14px}#didomi-host .didomi-buttons button{position:relative;padding:0 !important}#didomi-host .didomi-buttons button span{transition:all .2s}@keyframes button-loading-spinner{from{transform:rotate(0turn)}to{transform:rotate(1turn)}}',""]);const s=a},609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),t.push(l))}},t}},601:e=>{e.exports=function(e){return e[1]}},729:(e,t,r)=>{r.r(t),r.d(t,{default:()=>g});var n=r(62),i=r.n(n),o=r(36),a=r.n(o),s=r(793),c=r.n(s),u=r(892),l=r.n(u),d=r(173),p=r.n(d),f=r(464),h=r.n(f),m=r(837),v={};v.styleTagTransform=h(),v.setAttributes=l(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=p(),i()(m.Z,v);const g=m.Z&&m.Z.locals?m.Z.locals:void 0},62:e=>{var t=[];function r(e){for(var r=-1,n=0;n{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},173:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},892:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},36:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},464:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},181:function(e,t){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);a.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>o[e]=()=>r[e]));return o.default=()=>r,a.d(i,o),i},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,r)=>(a.f[r](e,t),t)),[])),a.u=e=>({360:"d31ef6f2918eede5697b",374:"b67aa9b4ed36e5a23e8a",376:"b6a8a2f8bca5907403e1",492:"e0a4db8779dc244a772e",512:"57b00dda6e1949a9f49b"}[e]+".js"),a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},n="@marfeel/marfeel-sdk:",a.l=(e,t,i,o)=>{if(r[e])r[e].push(t);else{var s,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l{s.onerror=s.onload=null,clearTimeout(f);var i=r[e];if(delete r[e],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(n))),t)return t(n)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),c&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.p="https://sdk.mrf.io/statics/",(()=>{a.b=document.baseURI||self.location.href;var e={179:0};a.f.j=(t,r)=>{var n=a.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((r,i)=>n=e[t]=[r,i]));r.push(n[2]=i);var o=a.p+a.u(t),s=new Error;a.l(o,(r=>{if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",s.name="ChunkLoadError",s.type=i,s.request=o,n[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,i,[o,s,c]=r,u=0;if(o.some((t=>0!==e[t]))){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);c&&c(a)}for(t&&t(r);u{var e=function(){try{var e;if(-1!==location.hash.indexOf("mrfdebug")||null!==(e=window.localStorage)&&void 0!==e&&e.getItem("mrfdebug")){for(var t=arguments.length,r=new Array(t),n=0;n{try{t(e)}catch(e){console.error(e)}}))}};var s=[];function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t{d&&performance.mark(e)},f=(e,t,r)=>{d&&(p(t),((e,t,r)=>{if(d){var n=performance.measure("".concat(e," to ").concat(t),e,t);!function(){try{if(d){for(var e=arguments.length,t=new Array(e),r=0;r{this.dependencies[e]||(this.dependencies[e]=new o),this.dependencies[e].get((e=>{n[r]=e,0==--i&&t(...n)}))})):t(...n)}register(e,t){this.dependencies[e]?this.dependencies[e].resolve(t):this.dependencies[e]=new o(t)}}),i(this,"config",void 0),this.config=e.config;var r=e=>e.forEach((e=>this.getSDKs(...e)));r(e.cmd.splice(0)),e.cmd.push=function(){for(var e=arguments.length,t=new Array(e),n=0;n{if((!(a=t.origin)||"null"===a||a===window.location.origin||s.includes(a))&&(o=t.data)&&"__MRF_SDK__"===o.app){var{sdkName:r,methodName:n,args:i}=t.data;e.cmd.push([r,e=>{e[n].apply(e,i)}])}var o,a}))}(e)}registerSDK(e,t,n){var i=this;return r((function*(){i.dependenciesContainer.get(t,(function(){for(var t=arguments.length,r=new Array(t),o=0;o{i.dependenciesContainer.register(e,new t(i.config,...r))})).catch((()=>{}))}))}))()}addConfig(e){var t=this;return r((function*(){t.config=u(u({},t.config),e)}))()}getSDKs(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0];i(this,"onChangeCallback",void 0),i(this,"consent",void 0),this.consent=e}isInitiated(){return!0}isActive(){return!0}onReady(e){e()}onChange(e){this.onChangeCallback=e}getConsent(){return this.consent}setConsent(e,t){var r;this.consent=t,null===(r=this.onChangeCallback)||void 0===r||r.call(this)}hasToPromptForConsent(e){e(!1)}hasConsentForVendor(e){return this.getConsent()}hasConsentForPurpose(e){return this.getConsent()}}var g=["tcloaded","useractioncomplete"],y={cookies:{vendors:[943],purposes:[1,7,8,9,10]},personalization:{vendors:[943],purposes:[1,5,6,7,8,9,10]}};class b{constructor(){i(this,"tcData",void 0),i(this,"isReady",!1),this.onReady((()=>{this.isReady=!0}).bind(this)),this.onChange((e=>{this.tcData=e}).bind(this))}isInitiated(){return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?this.isReady:!!this.tcData}isActive(){var e;return!(null==this||null===(e=this.tcData)||void 0===e||!e.gdprApplies)}hasToPromptForConsent(e){this.addEventListener((t=>{var r,n,{cmpStatus:i}=t;"loaded"===i&&(null===(r=(n=window).__tcfapi)||void 0===r||r.call(n,"ping",2,(t=>{var{displayStatus:r}=t;return e("disabled"!==r)})))}))}hasConsentForVendor(e){var t,r;return!0===(null===(t=this.tcData)||void 0===t||null===(r=t.vendor)||void 0===r?void 0:r.consents[e])}hasConsentForPurpose(e){var t,r;return!0===(null===(t=this.tcData)||void 0===t||null===(r=t.purpose)||void 0===r?void 0:r.consents[e])}matchRequirements(e){return!!e&&!!this.tcData&&e.vendors.every(this.hasConsentForVendor.bind(this))&&e.purposes.every(this.hasConsentForPurpose.bind(this))}onChange(e){this.addEventListener(((t,r)=>{!r||!g.includes(t.eventStatus)&&t.gdprApplies||e(t)}))}onReady(e){this.isInitiated(!1)?e():this.addEventListener((t=>{var r,n,{cmpStatus:i,listenerId:o}=t;"loaded"===i&&(e(),null===(r=(n=window).__tcfapi)||void 0===r||r.call(n,"removeEventListener",2,(()=>{}),o))}))}getConsent(e){return!(!this.tcData||this.tcData.gdprApplies)||this.matchRequirements(y[e])}addEventListener(e){var t,r;window.__tcfapi?null===(t=(r=window).__tcfapi)||void 0===t||t.call(r,"addEventListener",2,e):setTimeout((()=>this.addEventListener(e)),100)}}var w="flagConsentReady";function O(e,t,r,n){return P.apply(this,arguments)}function P(){return(P=r((function*(e,t,r,n){var i="".concat(w,"_t_").concat(n);return t.onReady((()=>{!function(e,t,r){if(e){var n=()=>!!t.getConsent("cookies")&&(r(),!0);n()||t.onChange((()=>n))}else r()}(e.blockOnNoConsent,t,(()=>r.resolve(i)))})),!e.blockOnNoConsent&&n&&setTimeout((()=>r.resolve(i)),n),r.wait(i)}))).apply(this,arguments)}class E{constructor(e){i(this,"handler",void 0),this.handler=function(e){return void 0!==e.gdpr&&!e.gdpr||!window.__tcfapi&&!window.gdprAppliesGlobally?new v:new b}(e)}isInitiated(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.handler.isInitiated(e)}isActive(){return this.handler.isActive()}onChange(e){this.handler.onChange(e)}onReady(e){this.handler.onReady(e)}getConsent(e){return this.handler.getConsent(e)}setConsent(e,t){this.handler instanceof v||(this.handler=new v),this.handler.setConsent(e,t)}hasToPromptForConsent(e){this.handler.hasToPromptForConsent(e)}hasConsentForVendor(e){return this.handler.hasConsentForVendor(e)}hasConsentForPurpose(e){return this.handler.hasConsentForPurpose(e)}}m("consent",[],(()=>Promise.resolve(E)));function k(){return k=r((function*(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;ne()));(yield Promise.all(i)).some((e=>e))&&(e=>{a.e(374).then(a.bind(a,374)).then((t=>{var{default:r,saveActiveOverlay:n}=t;new r(e),n()}))})(e)})),k.apply(this,arguments)}function S(e){return r((function*(){return!!new URL(window.location.href).searchParams.get(e)}))}function C(){var e,t;return window.marfeel=null!==(e=window.marfeel)&&void 0!==e?e:{},window.marfeel.cmd=null!==(t=window.marfeel.cmd)&&void 0!==t?t:[],window.marfeel.cmd}var j="marfeel-sdk-store";function T(e){return e.update=Date.now(),t=j,r=btoa(JSON.stringify(e)),new Promise((e=>{C().push(["consent",n=>{try{if(n.getConsent("cookies"))return window.localStorage.setItem(t,r),e(!0)}catch(e){}return e(!1)}])}));var t,r}function A(){return I.apply(this,arguments)}function I(){return(I=r((function*(){var e,t,r=yield(e=j,new Promise((t=>{C().push(["consent",r=>{try{if(r.getConsent("cookies"))return t(window.localStorage.getItem(e))}catch(e){}return t(null)}])})));return r?JSON.parse(atob(r)):(T(t={creation:Date.now(),update:Date.now(),entries:{}}),t)}))).apply(this,arguments)}function D(e){return _.apply(this,arguments)}function _(){return(_=r((function*(e){return(yield A()).entries[e]}))).apply(this,arguments)}function x(e,t){return N.apply(this,arguments)}function N(){return(N=r((function*(e,t){var r=yield A();return r.entries[e]=t,T(r)}))).apply(this,arguments)}const L="undefined"!=typeof window&&/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent)&&((e=window.navigator.userAgent)=>{const t=function(e,t){const r=(e||window.navigator.userAgent).match(/version\/(\d+(\.\d+)?)/i);return r&&r.length>1&&r[1]||""}(e),r=parseInt(t.split(".")[0],10);return!isNaN(r)&&r})()<13,R=(()=>{try{return"keepalive"in new Request("https://www.google.com/")}catch(e){return!1}})(),M="undefined"!=typeof window&&void 0!==window.navigator.sendBeacon,U=e=>{void 0!==document.addEventListener&&void 0!==document.hidden&&document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&e()})),window.addEventListener("pagehide",(()=>{e()}),{capture:!0}),L&&addEventListener("beforeunload",e,!0)},V=e=>{void 0!==document.addEventListener&&void 0!==document.hidden&&document.addEventListener("visibilitychange",(()=>{"hidden"!==document.visibilityState&&e()})),window.addEventListener("pageshow",(()=>{e()}),{capture:!0})},q=(e,t,r,n,i=!0)=>{const o=new XMLHttpRequest;o.open("POST",e,i),n&&o.setRequestHeader("Content-Type",n),o.withCredentials=!0,o.onreadystatechange=()=>{4===o.readyState&&200===o.status&&r&&r(o.responseText)},o.send(t)},F=(e,t,{needsXHR:r,contentType:n,sync:i,keepalive:o=!0}={needsXHR:!1,sync:!1},a)=>{r||L?q(e,t,a,n):o&&R?((e,t,r)=>{let n=t;return r&&(n=new Blob([t],{type:r})),fetch(e,{method:"POST",body:n,keepalive:!0})})(e,t,n).catch((()=>{})):M?((e,t,r)=>{let n=t;r&&(n=new Blob([t],{type:r})),window.navigator.sendBeacon(e,n)})(e,t,n):q(e,t,a,n,!i)},z={childList:!0,subtree:!0};let H;const B=[],K=e=>{B.forEach((t=>{t(e)}))};function G(e){return new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&e(t.target)}))}))}const J=(e,t=document.body)=>{const r=t===document.body;if(e){const i=((e,t)=>{let r;return function(...t){clearTimeout(r),r=setTimeout((()=>{e(...t)}),400)}})(e);"undefined"!=typeof MutationObserver&&(r?(n=()=>{i(document.body)},B.push(n),H||(H=G(K),H.observe(document.body,z))):G(i).observe(t,z))}var n};let X={};const W=e=>"fbia"===e?window.ia_document.shareURL:window.location.href,Q=e=>{const t=(e=>"fbia"===e?window.ia_document.referrer:document.referrer)(e);if(t)try{if(new URL(t).pathname.endsWith(".js"))return null}catch(e){}return t},Z=RegExp("^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])");function $(e,{cache:t=!0,readonly:r=!0}={}){try{if(!r)return new URL(e,document.baseURI);if(!X[e]){const{host:r,hostname:n,pathname:i,port:o,protocol:a,search:s,hash:c,href:u,origin:l}=new URL(e,document.baseURI),d={host:r,hostname:n,pathname:i,port:o,protocol:a,search:s,hash:c,href:u,origin:l};if(!t)return d;X[e]=d}return Object.assign({},X[e])}catch(e){return{}}}const Y="data-mrf-link";function ee(e,t,r=!0){const n=e;(r||!n.mrfLink)&&(n.mrfLink=t),(r||!e.hasAttribute(Y))&&e.setAttribute(Y,t)}const te=e=>$(e).href,re=e=>{try{const t=new URL(e);return t.host.includes("mrf.io")&&t.searchParams.get("url")||e}catch(t){return e}};var ne,ie=new Uint8Array(16);function oe(){if(!ne&&!(ne="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ne(ie)}var ae=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function se(e){return"string"==typeof e&&ae.test(e)}for(var ce=[],ue=0;ue<256;++ue)ce.push((ue+256).toString(16).substr(1));function le(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(ce[e[t+0]]+ce[e[t+1]]+ce[e[t+2]]+ce[e[t+3]]+"-"+ce[e[t+4]]+ce[e[t+5]]+"-"+ce[e[t+6]]+ce[e[t+7]]+"-"+ce[e[t+8]]+ce[e[t+9]]+"-"+ce[e[t+10]]+ce[e[t+11]]+ce[e[t+12]]+ce[e[t+13]]+ce[e[t+14]]+ce[e[t+15]]).toLowerCase();if(!se(r))throw TypeError("Stringified UUID is invalid");return r}function de(e,t,r){var n=(e=e||{}).random||(e.rng||oe)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return le(n)}function pe(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function fe(e,t){return e<>>32-t}var he=function(e,t,r){function n(e,t,r,n){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}(t)),16!==t.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+e.length);if(i.set(t),i.set(e,t.length),(i=function(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var i=0;i>>0;b=y,y=g,g=fe(v,30)>>>0,v=m,m=P}r[0]=r[0]+m>>>0,r[1]=r[1]+v>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+y>>>0,r[4]=r[4]+b>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}(i))[6]=15&i[6]|80,i[8]=63&i[8]|128,r){n=n||0;for(var o=0;o<16;++o)r[n+o]=i[o];return r}return le(i)}try{n.name="v5"}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}();const me=e=>!!e&&se(e),ve=()=>{try{return de()}catch(e){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}},ge=e=>(()=>{const e=document.querySelector('meta[property="mrf:canonical"][content]'),t=null==e?void 0:e.getAttribute("content");return!!t&&te(t)||null})()||(()=>{const e=document.querySelector('link[rel="canonical"][href]'),t=null==e?void 0:e.getAttribute("href");return!!t&&te(t)||null})()||(e=>{if("fbia"===e){const e=document.createElement("a");return e.href=window.ia_document.shareURL,e.origin+e.pathname}return window.location.origin+window.location.pathname})(e),ye={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"},be="scrollHeight",we=document.documentElement,Oe=[{qs:".mrf-current .mrf-detailsBody",max:999},{qs:".mrf-current .mrf-sectionPart",max:999},{qs:".mrf-article-body",max:999},{qs:"article",max:1}];let Pe,Ee=0;const ke=(e,t=0,r=!0,n=!1)=>{let i;try{e&&(Pe=r||!Pe?Oe.reduce(((e,t)=>{if(e)return e;const r=document.querySelectorAll(t.qs);return r&&r.length<=t.max?(e=>{const t=[];return e.forEach((e=>(e=>{const t=e.getBoundingClientRect();if(!t.width&&!t.height)return!1;const r=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,i=t.top<=r&&t.top+t.height>=0,o=t.left<=n&&t.left+t.width>=0;return i&&o})(e)&&t.push(e))),t.length>0?t.sort(((e,t)=>t.offsetTop-e.offsetTop))[0]:null})(Array.from(r)):null}),null):Pe,Ee=0);const n=(e=>{const t=(()=>{const e=document.body;return we.scrollTop||!!e&&e.scrollTop||0})();return e?t-e.offsetTop:t})(Pe),o=(e=>{const t=document.body;return e?e.offsetHeight:we[be]||!!t&&t[be]||0})(Pe),a=we.clientHeight;i=t?(n+t)/o*100:n/(o-a)*100,i>Ee?Ee=i:i=Ee}catch(e){i=50}return n?i:isNaN(i)?50:i>100?100:i<0?0:i},Se={},Ce=(()=>{try{const e="__test_session_storage__";return window.sessionStorage.setItem(e,e),window.sessionStorage.removeItem(e),!0}catch(e){return!1}})(),je=(e,t)=>{try{Ce?window.sessionStorage.setItem(e,t):Se[e]=t}catch(e){}},Te=e=>{try{return Ce?window.sessionStorage.getItem(e):Se[e]}catch(e){return null}},Ae=(e,t)=>{const r=JSON.stringify(t);je(e,r)};let Ie,De=!0;const _e={getConsent:()=>De,isInitiated:()=>!0,setConsent:(e,t)=>{var r;De=!0===(r=t)||"true"===r,je("__nrCookieConsent",De),Ie&&Ie()},onChange:e=>{Ie=e}};function xe(e){return e||!1===e}function Ne(e){var t;return e.isInitiated()?null!=e&&null!==(t=e.isActive)&&void 0!==t&&t.call(e)?e.getConsent("cookies")?1:0:3:2}class Le{static wait(){return Promise.resolve(!0)}static resolve(){}}class Re{static emitRecirculation(){}}function Me(e,t){return(void 0!==e[t]||null===e[t])&&e[t]}function Ue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return Math.floor(e.getTime()/1e3)}const Ve=e=>{const t=document.cookie.indexOf(e+"="),r=t+e.length+1;if(!t&&e!==document.cookie.substring(0,e.length))return null;if(-1===t)return null;let n=document.cookie.indexOf(";",r);return-1===n&&(n=document.cookie.length),unescape(document.cookie.substring(r,n))},qe=(e,t,r,n,i)=>{const o=i?[i,".".concat(i)]:[""],a=new Date;a.setTime(a.getTime());const s="https:"===window.location.protocol;o.forEach((i=>{document.cookie=e+"="+escape(t)+(r?";expires="+r:"")+(n?";path="+n:"")+(i?";domain="+i:"")+(s?";secure":"")}))},Fe={score:"-1"},ze="".concat("https://compassdynamicpaywall.mrf.io","/score/"),He="".concat("https://compassdynamicpaywall.mrf.io","/predict/"),Be=e=>{let{accountId:t,userId:r,siteUserId:n,totalPageviews:i,sessionDuration:o}=e;const a=new URLSearchParams(window.location.search),s=a.get("utm_medium"),c=a.get("utm_source"),u=["ac=".concat(t),"url=".concat(encodeURIComponent(window.location.href)),"u=".concat(r),"pp=".concat(document.referrer)];return n&&u.push("sui=".concat(n)),s&&u.push("utm_medium=".concat(s)),c&&u.push("utm_source=".concat(c)),i&&u.push("tp=".concat(i)),o&&u.push("sd=".concat(o)),u.join("&")};let Ke;const Ge={rfv:"-1"},Je=(e,t)=>{const r={rfv:e,ts:new Date};return je("".concat("compass_rfv","_").concat(t),JSON.stringify(r)),e},Xe=(e,t,r)=>{const n=new FormData;return n.append("u",t),n.append("ac",e),n.append("sui",r||""),n},We=e=>{const{ts:t,rfv:r}=(e=>{const t=Te("".concat("compass_rfv","_").concat(e));let r={ts:null,rfv:null};if(t)try{r=JSON.parse(t)}catch(e){}return r})(e);return(e=>{if(!e)return!0;const t=new Date(e);return t.setMinutes(t.getMinutes()+30),t{try{const e="__test_local_storage__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}})(),$e=(e,t)=>{try{Ze?window.localStorage.setItem(e,t):Qe[e]=t}catch(e){}},Ye=["data-mrf-recirculation","data-dtm-region","dtm-region"],et=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e?" ".concat(e):e;return Ye.map((e=>"[".concat(e,"]").concat(t))).join(",")};function tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rt(e){for(var t=1;te&&e.split("?")[0].split("#")[0],it=()=>[...document.body.querySelectorAll(et())].filter((e=>e.shadowRoot)),ot=e=>null!==e.getAttribute("data-mrf-layout")?e.querySelector("[".concat("data-mrf-layout-anchor","]")):e,at=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=ot(e);if(!r)return null;if(r!==e)return at(r,t);const n=function(e,t){let r=null;if(r=t?e.getAttribute(t):"mrfLink"in e&&e.mrfLink||e.getAttribute(Y)||e.getAttribute("href")||e.getAttribute("data-mrf-uri"),null===r)return null;const n=$(r||"");return"null"===n.origin?null:n.href}(e,t);return n?(e=>!!e&&$(e).host===window.location.host)(n)?n&&nt(n):n:null};function st(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const ct=()=>(e=>{const t=(e=>{try{return Ze?window.localStorage.getItem(e):Qe[e]}catch(e){return null}})("___m_rec");if(t)try{return JSON.parse(t)}catch(e){}return null})(),ut=(e,t)=>{if(Ze){const r=function(e){for(var t=1;te.hasAttribute("cmp-ltrk"),dt=e=>e.hasAttribute("data-mrf-recirculation-skip"),pt=e=>e.getAttribute("cmp-ltrk-idx"),ft=(e,t,r)=>{e.setAttribute("cmp-ltrk",t),e.setAttribute("cmp-ltrk-idx","".concat(r))},ht=e=>"[".concat("cmp-ltrk",'="').concat(e,'"]'),mt=(e,t,r)=>{const n=e.map((e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";const r=function(){for(var e=arguments.length,r=new Array(e),n=0;n!Boolean(e))))return;const a="missing"===t?":not([".concat(o,"])"):"",s=i.join(" ");return et("".concat(s).concat(a))};return{element:r(e.element,"data-mrf-layout"),anchor:r(e.element,e.anchor,"data-mrf-layout-anchor"),img:r(e.element,e.img,"data-mrf-layout-img"),title:r(e.element,e.title,"data-mrf-layout-title")}}(e,"missing")[t])).filter(Boolean).join(",");n&&Array.from(document.querySelectorAll(n)).forEach((e=>e.setAttribute(r,"")))},vt=e=>{e.length&&(mt(e,"element","data-mrf-layout"),mt(e,"anchor","data-mrf-layout-anchor"),mt(e,"img","data-mrf-layout-img"),mt(e,"title","data-mrf-layout-title"))},gt=e=>{const t={};return e.reduce(((e,r)=>{const{el:n}=r,i=(e=>{try{const t=pt(e);if(t)return parseInt(t,10)}catch(e){}})(n);return void 0!==i&&t[i]||(e.push(r),t[i]=!0),e}),[])},yt=(e,t)=>{let{el:r}=e;const n={url:at(r,t)},i=pt(r);return i&&(n.p=i),r.getAttribute("data-mrf-experiment")&&(n.tv=r.getAttribute("data-mrf-experiment")),n},bt=(e,t)=>e.map(((e,r)=>{const n=yt(e,t);return parseInt(n.p,10)===r&&delete n.p,n.tv||n.p?n:n.url}));let wt;const Ot={};class Pt{constructor(){this.timer=null}callOnTimer(e,t){this.timer=setTimeout((()=>{e()}),t)}cleanAndCallTimer(e,t){this.cleanTimer(),this.timer=setTimeout((()=>{e()}),t)}cleanTimer(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)}}class Et{constructor(){this.store={}}push(e,t){this.store[e]?this.store[e].push(t):this.store[e]=[t]}clear(e){delete this.store[e]}contains(e,t){var r;return null===(r=this.store[e])||void 0===r?void 0:r.includes(t)}forEach(e){return Object.entries(this.store).forEach(e)}}const kt=new Pt,St=new Et,Ct=new Et,jt=e=>{const t=[];St.forEach((e=>{let[r,n]=e;t.push({module:r,links:n}),St.clear(r)})),Object.keys(t).length>0&&e("impression",t)},Tt=(e,t)=>{e.forEach((e=>{let{links:r,urlAttr:n,name:i}=e;i&&r.forEach((e=>{const r=yt(e,n);!function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n="IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype&&"isIntersecting"in window.IntersectionObserverEntry.prototype?Promise.resolve():a.e(360).then(a.t.bind(a,360,23));e.setAttribute("mrfObservableId",ve()),Ot[e.getAttribute("mrfObservableId")]=t,n.then((()=>{wt=wt||new IntersectionObserver((e=>{e.filter((e=>e.isIntersecting)).forEach((e=>{let{target:t}=e;const n=t.getAttribute("mrfObservableId");var i;n?(null===(i=Ot[n])||void 0===i||i.call(Ot,t),r||(wt.unobserve(t),delete Ot[n])):wt.unobserve(t)}))})),wt.observe(e)}))}(e.el,(()=>{((e,t)=>{Ct.contains(e,t.p)||(St.push(e,t),Ct.push(e,t.p))})(i,r),kt.cleanAndCallTimer((()=>jt(t)),1e3)}))}))})),jt(t)};function At(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function It(e){for(var t=1;t{const r=e.map((e=>{let{name:t,links:r,urlAttr:n}=e;return{module:t,links:bt(r,n)}}));r.length&&t("elegible",r)},_t=(e,t)=>{e.forEach((e=>{let{name:r,links:n,urlAttr:i}=e;n.forEach((e=>{e.el.addEventListener("click",(n=>{const o=e.el,a=at(o,i);var s,c;s=e.el,!n.__mrfTracked&&!0!==(null===(c=ot(s))||void 0===c?void 0:c.__mrfTracked)&&a&&(((e,t)=>{const r=ot(e);t.__mrfTracked=!0,r&&(r.__mrfTracked=!0)})(e.el,n),ut(r||"",a),t("click",[{module:r,links:bt([e],i)}],!1))}))}))}))},xt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>!0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body,r=arguments.length>2?arguments[2]:void 0;const n=r?"a":Ye.map((e=>"[".concat(e,"] a[href], a[href][").concat(e,"], [").concat(e,"] article[data-mrf-uri], [").concat(e,"] [").concat("data-mrf-layout","]"))).join(","),i=Array.from(t.querySelectorAll(n)).reduce(((t,n)=>{const i=(e=>e&&e.closest(et()))(n)||r,o=(e=>{var t;return null===(t=Ye.reduce(((t,r)=>t||(null==e?void 0:e.getAttribute(r))),void 0))||void 0===t?void 0:t.replace(/"/g,'\\"')})(i),a=(null==i?void 0:i.getAttribute("data-mrf-recirculation-url-attribute"))||"",s=n,c=at(s,a);if(c&&ee(s,c,!1),!o||!c||!e(o,s))return t;const u=t[o]||{links:[]};return It(It({},t),{},{[o]:It(It({},u),{},{links:[...u.links,{el:s,root:i}],urlAttr:a})})}),{});return(e=>{const t=it();Object.entries(e).forEach((e=>{let[r,{links:n,urlAttr:i}]=e;const o=(e=>Number(e.map((e=>e.getAttribute("cmp-ltrk-idx"))).filter(Boolean).map(parseInt).reduce(((e,t)=>isNaN(e)||e{const r=t.filter((t=>{return r=e,n=t,Ye.some((e=>{var t;return(null===(t=n.getAttribute(e))||void 0===t?void 0:t.toLowerCase())===r.toLowerCase()}));var r,n})).reduce(((t,r)=>{var n;return[...t,...(null===(n=r.shadowRoot)||void 0===n?void 0:n.querySelectorAll(ht(e)))||[]]}),[]);return[...document.querySelectorAll(ht(e)),...r]})(r,t));let a=isNaN(o)?0:o+1;n.forEach((e=>{const{el:t,root:o}=e,s=at(t,i);if(dt(t)||lt(t)||!s)return;ft(t,r,a);const c=n.filter((e=>{let{el:r,root:n}=e;return r!==t&&n===o&&!dt(r)&&!lt(r)&&at(r,i)===s}));c.length&&(c.forEach((e=>{let{el:t}=e;return ft(t,r,a)})),(e=>{["data-mrf-experiment"].forEach((t=>{const r=e.find((e=>{let{el:t}=e;return t.hasAttribute("data-mrf-experiment")}));if(r){const n=r.el.getAttribute("data-mrf-experiment");e.forEach((e=>{let{el:r}=e;r.getAttribute("data-mrf-experiment")!==n&&r.setAttribute(t,n||"")}))}}))})([...c,e])),a++}))}))})(i),Object.entries(i).map((e=>{let[t,r]=e;return{name:t,links:r.links,urlAttr:r.urlAttr}}))},Nt=e=>e.map((e=>{let{links:t,name:r,urlAttr:n}=e;return{name:r,urlAttr:n,links:gt(t)}}));function Lt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{},t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{parentNode:n,layouts:i=[]}=r;vt(i);const o=xt(((e,t)=>!lt(t)&&!dt(t)),t,n),a=Nt(o);return Dt(a,e),Tt(o,e),_t(o,e),o.length}function Rt(e,t,r,n){Lt(e,t,r)&&n(),J((t=>{Lt(e,t,r)&&n()}),t)}const Mt=async()=>{document&&"loading"===document.readyState&&await new Promise((e=>{document.addEventListener("DOMContentLoaded",e)}))},Ut=(e,t)=>{e&&t&&ut("fc:".concat(e),t)},Vt=e=>{let{modules:t,blacklist:r,redirectionLinks:n}=e,i=!1;return r.forEach((e=>{let{selector:t}=e;const r=document.querySelectorAll(t);Array.from(r).forEach((e=>{e instanceof HTMLElement&&!e.hasAttribute("data-mrf-recirculation-skip")&&e.setAttribute("data-mrf-recirculation-skip","")}))})),null==n||n.forEach((e=>{let{selector:t,queryParam:r}=e;const n=document.querySelectorAll(t);Array.from(n).forEach((e=>{if(!e.hasAttribute("data-mrf-recirculation-skip"))try{const n=(t=new URL(decodeURIComponent(decodeURIComponent(e.href))).search).length?t.slice(1).split("&").map((e=>e.split("="))).reduce(((e,t)=>{let[r,n]=t;return rt(rt({},e),{},{[r]:n})}),{}):{};n[r]&&ee(e,decodeURIComponent(n[r]))}catch(e){}var t}))})),t.forEach((e=>{const t="selector"in e?e.selector:"[".concat(e.attr,"]"),r="name"in e?()=>e.name:t=>t.getAttribute(e.attr),n=document.querySelectorAll(t),o=e.urlAttribute;Array.from(n).forEach((e=>{(e=>(e=>(null===window||void 0===window?void 0:window.HTMLElementOrig)?e instanceof window.HTMLElementOrig:e instanceof HTMLElement)(e)&&!e.hasAttribute("data-mrf-recirculation-skip")&&!e.hasAttribute("data-mrf-recirculation")&&!e.closest("[data-mrf-experience]"))(e)&&(e.setAttribute("data-mrf-recirculation",r(e)),o&&e.setAttribute("data-mrf-recirculation-url-attribute",o),i=!0)}))})),i};var qt,Ft,zt,Ht,Bt,Kt=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Gt=function(e){if("loading"===document.readyState)return"loading";var t=Kt();if(t){if(e(t||100)-1)return r||i;if(r=r?i+">"+r:i,n.id)break;e=n.parentNode}}catch(e){}return r},Wt=-1,Qt=function(){return Wt},Zt=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Wt=t.timeStamp,e(t))}),!0)},$t=function(){var e=Kt();return e&&e.activationStart||0},Yt=function(e,t){var r=Kt(),n="navigate";return Qt()>=0?n="back-forward-cache":r&&(document.prerendering||$t()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},er=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(e){}},tr=function(e,t,r,n){var i,o;return function(a){t.value>=0&&(a||n)&&((o=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,r),e(t))}},rr=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},nr=function(e){var t=function(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||e(t)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},ir=function(e){var t=!1;return function(r){t||(e(r),t=!0)}},or=-1,ar=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},sr=function(e){"hidden"===document.visibilityState&&or>-1&&(or="visibilitychange"===e.type?e.timeStamp:0,ur())},cr=function(){addEventListener("visibilitychange",sr,!0),addEventListener("prerenderingchange",sr,!0)},ur=function(){removeEventListener("visibilitychange",sr,!0),removeEventListener("prerenderingchange",sr,!0)},lr=function(){return or<0&&(or=ar(),cr(),Zt((function(){setTimeout((function(){or=ar(),cr()}),0)}))),{get firstHiddenTime(){return or}}},dr=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},pr=[1800,3e3],fr=function(e,t){t=t||{},dr((function(){var r,n=lr(),i=Yt("FCP"),o=er("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime=0&&Ft1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var r=function(){gr(e,t),i()},n=function(){i()},i=function(){removeEventListener("pointerup",r,mr),removeEventListener("pointercancel",n,mr)};addEventListener("pointerup",r,mr),addEventListener("pointercancel",n,mr)}(t,e):gr(t,e)}},wr=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,br,mr)}))},Or=[100,300],Pr=0,Er=1/0,kr=0,Sr=function(e){e.forEach((function(e){e.interactionId&&(Er=Math.min(Er,e.interactionId),kr=Math.max(kr,e.interactionId),Pr=kr?(kr-Er)/7+1:0)}))},Cr=function(){return Bt?Pr:performance.interactionCount||0},jr=[200,500],Tr=0,Ar=function(){return Cr()-Tr},Ir=[],Dr={},_r=function(e){var t=Ir[Ir.length-1],r=Dr[e.interactionId];if(r||Ir.length<10||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};Dr[n.id]=n,Ir.push(n)}Ir.sort((function(e,t){return t.latency-e.latency})),Ir.splice(10).forEach((function(e){delete Dr[e.id]}))}},xr=[2500,4e3],Nr={};class Lr{constructor(){this.cls=0,this.lcp=0,this.fid=0,this.fcp=0,this.wv=0,this.tbt=0,this.inp=0,this.lcpOffender=null,this.clsOffender=null,this.inpOffender=null,this.setTbt(),this.setINP(),this.setLCP(),this.setFCP(),this.setFID(),this.setCLS()}hasWebVitals(){return this.lcp||this.fcp||this.cls||this.fid||this.inp?1:0}setLCP(){var e;e=e=>{var t;this.lcp=e.value,this.lcp>2500&&null!==(t=e.attribution)&&void 0!==t&&t.element&&(this.lcpOffender=e.attribution.element)},function(e,t){t=t||{},dr((function(){var r,n=lr(),i=Yt("LCP"),o=function(e){var t=e[e.length-1];t&&t.startTimethis.fcp=e.value,fr((function(t){!function(e){if(e.entries.length){var t=Kt(),r=e.entries[e.entries.length-1];if(t){var n=t.activationStart||0,i=Math.max(0,t.responseStart-n);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:Gt(e.entries[0].startTime),navigationEntry:t,fcpEntry:r})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:Gt(Qt())}}(t),e(t)}),void 0)}setFID(){var e;e=e=>this.fid=e.value,function(e,t){t=t||{},dr((function(){var r,n=lr(),i=Yt("FID"),o=function(e){e.startTime{var t,r;this.inp=e.value,this.inp>200&&null!==(t=e.attribution)&&void 0!==t&&t.eventTarget&&(this.inpOffender="".concat(null===(r=e.attribution)||void 0===r?void 0:r.eventType,"::").concat(e.attribution.eventTarget),this.inpOffenderStatus=e.attribution.loadState)},function(e,t){t=t||{},dr((function(){"interactionCount"in performance||Bt||(Bt=er("event",Sr,{type:"event",buffered:!0,durationThreshold:0}));var r,n=Yt("INP"),i=function(e){e.forEach((function(e){e.interactionId&&_r(e),"first-input"===e.entryType&&!Ir.some((function(t){return t.entries.some((function(t){return e.duration===t.duration&&e.startTime===t.startTime}))}))&&_r(e)}));var t,i=(t=Math.min(Ir.length-1,Math.floor(Ar()/50)),Ir[t]);i&&i.latency!==n.value&&(n.value=i.latency,n.entries=i.entries,r())},o=er("event",i,{durationThreshold:t.durationThreshold||40});r=tr(e,n,jr,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),nr((function(){i(o.takeRecords()),n.value<0&&Ar()>0&&(n.value=0,n.entries=[]),r(!0)})),Zt((function(){Ir=[],Tr=Cr(),n=Yt("INP"),r=tr(e,n,jr,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:Xt(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:Gt(t.startTime)}}else e.attribution={}}(t),e(t)}),void 0)}setTbt(){return!!((e,t)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{e.getEntries().map((e=>t(e)))}));return r.observe({type:e,buffered:!0}),r}}catch(e){}})("longtask",(e=>{this.tbt+=e.duration-50}))}setCLS(){var e;e=e=>{var t;this.cls=e.value,this.cls>.1&&null!==(t=e.attribution)&&void 0!==t&&t.largestShiftTarget&&(this.clsOffender=e.attribution.largestShiftTarget,this.clsOffenderStatus=e.attribution.loadState)},function(e,t){t=t||{},fr(ir((function(){var r,n=Yt("CLS",0),i=0,o=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],r=o[o.length-1];i&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}})),i>n.value&&(n.value=i,n.entries=o,r())},s=er("layout-shift",a);s&&(r=tr(e,n,hr,t.reportAllChanges),nr((function(){a(s.takeRecords()),r(!0)})),Zt((function(){i=0,n=Yt("CLS",0),r=tr(e,n,hr,t.reportAllChanges),rr((function(){return r()}))})),setTimeout(r,0))})))}((function(t){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var r=(n=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||n[0];if(r)return void(e.attribution={largestShiftTarget:Xt(r.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:r,largestShiftEntry:t,loadState:Gt(t.startTime)})}}var n;e.attribution={}}(t),e(t)}),void 0)}}function Rr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mr(e){for(var t=1;t{Ur.cleanTimer()},Fr=(e,t)=>{Ur.callOnTimer(t,e)},{userIdPromise:zr,resolveFinalUserId:Hr}=(()=>{let e=()=>{};return{userIdPromise:new Promise((t=>{e=t})),resolveFinalUserId:e}})();class Br{constructor(e){this.compassTracker=e}getUserId(){return{userIdPromise:zr,actualUserId:this.compassTracker.permanentCookie.userId}}processIngestResponse(e){e&&(me(e.uid)&&(this.compassTracker.permanentCookie.userId=e.uid,this.compassTracker.markAsModified("permanent")),me(e.sid)&&(this.compassTracker.temporalCookie.sessionId=e.sid,this.compassTracker.markAsModified("temporal")),this.compassTracker.saveCookies()),me(this.compassTracker.permanentCookie.userId)&&Hr(this.compassTracker.permanentCookie.userId)}}const Kr={web:0,fbia:2,iosapp:3,androidapp:4,flowcards:5,pressreader:6,app:7,applenews:8,pressreaderandroid:11,pressreaderios:12},Gr=e=>{if(isNaN(e)){const t=e.toLowerCase().replace(/ /g,"");return void 0!==Kr[t]?Kr[t]:null}return e};let Jr=[];const Xr=(e,t)=>{const r=[e,t];let n=!0;for(let t=0;tWr=null,Zr=e=>{const t=e.parentElement;t&&(t.addEventListener("mouseenter",(()=>(e=>{Wr=e})(e))),t.addEventListener("mouseleave",Qr))},$r=(e,t,r)=>{const n=Array.from(e).filter((e=>!e.hasAttribute("cmp-cnvtrk")));for(const e of n)e.addEventListener(t,(()=>{const t=e.dataset.mrfConversion;t&&r(t)})),e.setAttribute("cmp-cnvtrk","true")},Yr=e=>{const t=document.querySelectorAll("iframe[data-mrf-conversion]"),r=document.querySelectorAll("form[data-mrf-conversion]"),n=document.querySelectorAll("button[data-mrf-conversion], a[data-mrf-conversion]");$r(r,"submit",e),$r(n,"click",e),(e=>{const t=Array.from(e).filter((e=>!e.hasAttribute("cmp-cnvtrk")));for(const e of t)Zr(e),e.setAttribute("cmp-cnvtrk","true")})(t)},en=e=>{J((()=>{Yr(e)})),Yr(e)};var tn;function rn(e){return e.update=Date.now(),function(e,t){try{return window.localStorage.setItem("marfeel-sdk-store",t),!0}catch(e){return!1}}(0,btoa(JSON.stringify(e)))}function nn(){return void 0===tn&&(tn=function(){var e=function(e){try{return window.localStorage.getItem("marfeel-sdk-store")}catch(e){return null}}();if(e)return JSON.parse(atob(e));var t={creation:Date.now(),update:Date.now(),entries:{}};return rn(t),t}()),tn}const on="compass-conversions-counter-entry",an=e=>{let t=(null!=e?e:"").toString();return!t.startsWith("/")&&t.includes("/")&&(t="/".concat(t)),t.split("/").map((e=>e.split(",").shift())).join("/")};class sn{constructor(){this.newAds=[],this.newAdUnitPaths=[],this.visibilityChangedSlots=[]}setInterstitialSlot(e){this.interstitialSlot=e}trackAdEvent(e,t){const r=this.mustBeTracked(e,t);if(r){const r=t.getAdUnitPath(),n=t.getResponseInformation()&&t.getResponseInformation().lineItemId;this.trackAdRenderedInternal(n||r,r),"slotVisibilityChanged"===e&&this.visibilityChangedSlots.push(t)}return r}trackAdEventLegacy(e,t,r){return"slotRenderEnded"===e&&(this.trackAdRenderedInternal(t||r,r),!0)}trackAdRenderedInternal(e,t){this.newAds.push(an(e)),t&&this.newAdUnitPaths.push(an(t))}getAds(){return this.newAds.splice(0)}getAdUnits(){return this.newAdUnitPaths.splice(0)}mustBeTracked(e,t){let r=!1;return"slotRenderEnded"===e&&(r=t!==this.interstitialSlot),"slotVisibilityChanged"===e&&(r=t===this.interstitialSlot&&!this.visibilityChangedSlots.includes(t)),r}}function cn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function un(e){for(var t=1;t{((e,t)=>{const r={requests:{ads:e},triggers:{renderEnd:{on:"ad-render-end",request:"ads",selector:"body",extraUrlParams:un(un({},t),{},{l:"${totalEngagedTime}",sc:ke(!1),a:"-1",ps:"${navTiming(navigationStart)}",n:"${timestamp}",ads:"$IF(${adSlot}, ${adSlot}, -1)amp",ampFirst:"true"})}},transport:{beacon:!0,xhrpost:!0,image:!1}},n=()=>{document.body.appendChild((e=>{const t=document.createElement("amp-analytics"),r=document.createElement("script");return r.type="application/json",r.innerText=JSON.stringify(e),t.appendChild(r),t})(r))};"loading"===document.readyState?window.addEventListener("load",(()=>n())):n()})(e,t)};class dn{constructor(){this.events={}}on(e,t){void 0===this.events[e]&&(this.events[e]={listeners:[]}),this.events[e].listeners.push(t)}remove(e,t){this.events[e].listeners=this.events[e].listeners.filter((e=>e.toString()!==t.toString()))}dispatch(e,t){this.events[e]&&this.events[e].listeners.forEach((e=>{e(t)}))}}function pn(e,t){try{const r=[...t],n=r.shift();let i;if(Array.isArray(e)){const r=e.map((e=>pn(e,t))).filter(Boolean);i=r.length&&r[0]}else i=e[n];return 0===r.length?i?null==i?void 0:i.toString():null:pn(i,r)}catch(e){return null}}function fn(e,t){for(const r of e){const e=pn(r,t);if(e)return e}return null}const hn=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;function mn(e){let t;return t=hn.test(e)?new Date(e):new Date(e+"Z"),t.getTime()}const vn={jsonLD:Object.freeze({__proto__:null,extract:function({attributePath:e}){try{const t=document.querySelectorAll('script[type="application/ld+json"]');return t&&e?function(e,t){var r;for(const n of e){const e=n.textContent?((null===(r=n.textContent)||void 0===r?void 0:r.trim())||"").replace(/\n|\t/g,""):"{}",i=JSON.parse(`${e}`);if(Array.isArray(i))return fn(i,t);const o=pn(i,t);if(o)return o}return null}(t,e):null}catch(e){return null}}}),querySelector:Object.freeze({__proto__:null,extract:function({queries:e}){if(!e)return null;const t=e.reduce(((e,{query:t,attribute:r})=>(document.querySelectorAll(t).forEach((t=>{r?e.push(t.getAttribute(r)||null):t.textContent&&e.push(t.textContent)})),e)),[]).filter((e=>null!==e));return 1===t.length||t.length>1&&t.every((e=>e===t[0]||mn(e)===mn(t[0])))?t[0]:null}})},gn=e=>{for(const t of e){const e=vn[t.type].extract(t);if(e)return e}return null},yn=[{type:"jsonLD",attributePath:["dateModified"]},{type:"jsonLD",attributePath:["@graph","dateModified"]},{type:"querySelector",queries:[{query:'meta[property="article:modified_time"]',attribute:"content"}]},{type:"querySelector",queries:[{query:'meta[itemprop="dateModified"]',attribute:"content"}]},{type:"querySelector",queries:[{query:'time[itemprop="dateModified"]',attribute:"datetime"}]},{type:"querySelector",queries:[{query:'time[itemprop="dateModified"]',attribute:"content"}]},{type:"querySelector",queries:[{query:'[itemprop="dateModified"]'}]}];var bn=Object.freeze({__proto__:null,extract:()=>gn(yn)});const wn=[{type:"jsonLD",attributePath:["datePublished"]},{type:"jsonLD",attributePath:["@graph","datePublished"]},{type:"querySelector",queries:[{query:'[itemtype="http://schema.org/NewsArticle"] time[itemprop="datePublished"]',attribute:"datetime"}]},{type:"querySelector",queries:[{query:'meta[property="article:published_time"]',attribute:"content"},{query:':not([itemprop="image"]) > meta[itemprop="datePublished"]',attribute:"content"},{query:'time[itemprop="datePublished"]',attribute:"datetime"},{query:'time[itemprop="datePublished"]',attribute:"content"},{query:'meta[name="cXenseParse:recs:publishtime"]',attribute:"content"}]},{type:"querySelector",queries:[{query:'[itemprop="datePublished"]'}]}];var On=Object.freeze({__proto__:null,extract:()=>gn(wn)});const Pn=[{type:"jsonLD",attributePath:["offers","lowPrice"]},{type:"jsonLD",attributePath:["@graph","offers","lowPrice"]},{type:"jsonLD",attributePath:["offers","price"]},{type:"querySelector",queries:[{query:'[itemprop="offers"] [itemprop="price"]',attribute:"content"}]},{type:"querySelector",queries:[{query:'meta[property="product:price:amount"]',attribute:"content"}]}];var En=Object.freeze({__proto__:null,extract:()=>gn(Pn)});const kn=[{type:"jsonLD",attributePath:["offers","availability"]},{type:"jsonLD",attributePath:["@graph","offers","availability"]},{type:"querySelector",queries:[{query:'[itemprop="offers"] link[itemprop="availability"]',attribute:"href"},{query:'[itemprop="offers"] [itemprop="availability"]',attribute:"content"}]},{type:"querySelector",queries:[{query:'meta[property="product:availability"]',attribute:"content"}]}],Sn={},Cn={updateTime:bn,publishTime:On,availability:Object.freeze({__proto__:null,extract:()=>gn(kn)}),price:En},jn=(e,t)=>{if(!Sn[e]||t){const t=Cn[e];Sn[e]=t.extract()}return Sn[e]},Tn=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{if(t){const t=Ve(e);return JSON.parse(t)||{}}return(e=>{const t=Te(e);if(t)try{return JSON.parse(t)}catch(e){}return null})(e)||{}}catch(e){return{}}},An=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=t?Tn("".concat(e,"_").concat(t),r):null;return n&&0!==Object.keys(n).length?n:Tn(e,r)};function In(e,t){let r=0;return e.active&&(r=5),Math.min(t-e.time,r)}class Dn{constructor(){this.totalEngagedTime=0,this.prevEvent=void 0}pushEvent(e){this.prevEvent&&this.prevEvent.time{document.addEventListener(e,(()=>this.eventTriggered(!0)))})),xn.forEach((e=>{document.addEventListener(e,(()=>this.eventTriggered(!1)))})),U((()=>this.eventTriggered(!1))),V((()=>this.eventTriggered(!0)))}getTimeSinceStart(){const e=Date.now()-this.startTime;return e>0?e:0}eventTriggered(e){e&&this.listeningActive||!e&&this.listeningInactive||(this.listeningActive=e,this.listeningInactive=!e,this.handleEvent(e))}handleEvent(e){const t=Math.floor(this.getTimeSinceStart()/1e3);setTimeout((()=>{this.listeningActive=!1,this.listeningInactive=!1}),1e3),this.acitvityHistory.pushEvent({active:e,time:t})}getTotalEngagedTime(){const e=Math.floor(this.getTimeSinceStart()/1e3);return this.acitvityHistory.getTotalEngagedTime(e)}}function Ln(){let e=arguments.length>1?arguments[1]:void 0,t=!1;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((e=>{let{selector:r,name:n}=e;document.querySelectorAll(r).forEach((e=>{e.getAttribute("data-mrf-conversion")||(t=!0,e.setAttribute("data-mrf-conversion",n))}))})),t&&Yr(e)}function Rn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const Mn=function(e){const t=e=>e&&"object"==typeof e;for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i(Object.keys(r).forEach((n=>{const i=e[n],o=r[n];Array.isArray(i)&&Array.isArray(o)?e[n]=[...i].concat(...o):t(i)&&t(o)?e[n]=Mn(i,o):e[n]=o})),e)),e)},Un=e=>[...new Set(e)],Vn="".concat("https://experiences.mrf.io","/passexperience/dw-check.html?v=6");let qn=!1;function Fn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zn(e){for(var t=1;t{const e=new Date;return e.setMonth(e.getMonth()+6),e.toGMTString()};class Bn{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Le,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Re;var i;this.trackerName=window.__mrfCompass?"__mrfCompass":"__newsroom_js",window[this.trackerName].data=window[this.trackerName].data||[],this.handleImmediateCallsToDataArray(),this.userIdManager=new Br(this),this.tracker=window[this.trackerName],this.accountId=this.tracker.accountId,this.cookieDomain=this.tracker.cookieDomain||(e=>{const t=e.split(".").filter((e=>"www"!==e));if(t.length<2||Z.test(e))return null;if(2===t.length)return t.join(".");const r=t.slice(-2),n=t.length-1;return(e=>{const t=e.length-1;return 2===e[t].length&&!!["avz","co","com","df","gob","gov","org","rt"].includes(e[t-1])})(r)&&r.unshift(t[n-2]),r.join(".")})(window.location.hostname),this.initFlags(),this.adsTracker=new sn,this.adsDelay=200,this.consentManager=t,this.setupConsent(this.tracker),this.synchronizer=r,this.events=n,this.dispatcher=new dn,this.initializeCookies(),this.tracker.lazy||this.initialize(),this.synchronizer.wait("pageInitialized").then((()=>{U((()=>{(e=>{this.synchronizer.resolve("experimentationDisabled",!1)})(),this.setPageVar("lastEvent",!0,!1),this.collectAndTrackPage()})),V((()=>{qr(),this.trackPage()}))})),i=()=>this.trackNewPage({rs:"back forward cache"}),window.addEventListener("pageshow",(e=>{e.persisted&&i()}),{capture:!0}),function(e,t,r){r?ln(e,t):window.customElements.whenDefined("amp-ad").then((()=>ln(e,t)))}(this.endpoint,this.getBasicConfig(),this.tracker.isAmpFirst),this.tracker.setFCSource=Ut,this.contextVariables={}}initFlags(){this.tracker.lazy=this.tracker.lazy||!1,this.tracker.isAmpFirst=this.tracker.isAmpFirst||!1,this.tracker.isCookieSandboxed=this.tracker.isCookieSandboxed||[1464,3838].includes(this.accountId),(window.navigator.userAgent.includes("Chrome-Lighthouse")||"Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36"===window.navigator.userAgent)&&(this.tracker.keepalive=!1);const e=zn({lazy:!1,layouts:[],modules:[]},this.tracker.rm||{});this.tracker.rm=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r={},n=function(e){for(var t=1;tObject.assign(r,{set:t=>{const r=t instanceof Function?t(n):t;e(Mn(n,r))}}))),r);return t&&o.set({}),o}(e,!e.lazy),this.tracker.usePerformanceEndpoint=this.tracker.usePerformanceEndpoint||!1,this.tracker.adsTrackingFromClient&&(this.nrGoogleTrackingActive=!0)}setInterstitialSlot(e){this.adsTracker.setInterstitialSlot(e)}initializeCookies(){const e=this.consentManager.getConsent("cookies");this.temporalCookie=function(e){const t=Me(e,"currentVisitStarted"),r=new Date;return r.setDate(r.getDate()-1),t&&t0&&void 0!==arguments[0]?arguments[0]:{};this.engagementCalculator=new Nn,this.performanceStartTime=performance.now();const{url:t,rs:r,initialPageVars:n}=((e,t)=>e?"string"==typeof e?{url:e}:e:{})(e),i=t?te(t):t;qr(),Jr=[],n&&await Promise.all(Object.entries(n).map((async e=>{let[t,r]=e;return await this.setPageVar(t,r,!1)}))),window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],void 0===this.nrGoogleTrackingActive&&(this.nrGoogleTrackingActive=!0,googletag.cmd.push((()=>{googletag.pubads().addEventListener("slotRenderEnded",(e=>{e.isEmpty||this.trackAdEvent("slotRenderEnded",e.slot)})),googletag.pubads().addEventListener("slotVisibilityChanged",(e=>{this.trackAdEvent("slotVisibilityChanged",e.slot)}))}))),this.temporalCookieModified=!1,this.permanentCookieModified=!1,this.adsTracked=!1,this.pageId=null,this.isFirstPage=!0,this.recirculationSource=null,this.updateTime=null,this.publishTime=null,this.newAds=[],this.newAdUnitPaths=[],this.conversion=null,this.tick=0,this.endpoint=this.tracker.endpoint||"https://events.newsroom.bi/ingest.php",this.endpointDomain=(e=>{const t=document.createElement("a");return t.href=e,t.origin})(this.endpoint),this.currentPage=i||W(this.tracker.pageType),this.startPageTime=Ue(),this.pageId=ve(),this.url=i||W(this.tracker.pageType),this.canonical=i||ge(this.tracker.pageType),this.setFirstVisit(),this.setPreviousVisit(),this.setCurrentVisitStarted(),this.setTimesVisited(),this.setPagesViewed(),this.setLandingPage(i),this.setRecirculationSource(r),this.saveCookies(),this.webVitals=new Lr,this.updateTime=jn("updateTime"),this.publishTime=jn("publishTime"),document.prerendering&&(await this.setPageVar("prerendering","prerendered",!1),await this.setPageVar("prerendered_tracked","true",!1),document.addEventListener("prerenderingchange",(()=>{this.setPageVar("prerendering","loaded",!1)})));const o=this.trackPage();return this.setRecirculationTracking(),(e=>{const t=e.trackConversion.bind(e);(e=>{window.addEventListener("blur",(()=>(e=>{Wr&&e(Wr)})(e)))})((e=>{var r;return e&&t(null==e||null===(r=e.dataset)||void 0===r?void 0:r.mrfConversion)})),document.readyState&&"complete"===document.readyState?en(t):document.addEventListener("DOMContentLoaded",(()=>{en(t)}))})(this),this.dispatcher.dispatch("pageInitialized",{url:this.canonical}),this.synchronizer.resolve("pageInitialized"),o}handleImmediateCallsToDataArray(){window[this.trackerName].data.oldPush=window[this.trackerName].data.push,window[this.trackerName].data.push=e=>{"getRFV"===e[0]?this.getRFV(e[1]):window[this.trackerName].data.oldPush(e)}}setFirstVisit(){let e=Me(this.permanentCookie,"firstVisit");if(!1===e){e=Ue(),this.permanentCookie.firstVisit=e;const t=Ve("compass_uid");this.permanentCookie.userId=t?me(t)?t:((e,t)=>{const r=he(`${e}`,"c0a334de-7622-4bd6-8bff-0b2b750cf2c6");return he(`${t}`,r)})(this.accountId,t):ve(),this.permanentCookie.userVars=[],this.markAsModified("permanent")}else this.permanentCookie.userVars=this.permanentCookie.userVars||[]}setPreviousVisit(){const e=Me(this.temporalCookie,"previousVisit"),t=Me(this.permanentCookie,"futurePreviousVisit");if(!1===e&&!1!==t)this.temporalCookie.previousVisit=t,this.permanentCookie.futurePreviousVisit=Ue(),this.markAsModified("temporal"),this.markAsModified("permanent");else if(!1===e&&!1===t){const e=Ue();this.temporalCookie.previousVisit=e,this.permanentCookie.futurePreviousVisit=e,this.markAsModified("temporal"),this.markAsModified("permanent")}}setCurrentVisitStarted(){let e=Me(this.temporalCookie,"currentVisitStarted");!1===e?(e=Ue(),this.temporalCookie.currentVisitStarted=e,this.markAsModified("temporal"),this.temporalCookie.sessionId=ve(),this.temporalCookie.sessionVars=[]):this.isFirstPage=!1}setTimesVisited(){let e=Me(this.permanentCookie,"timesVisited");!1!==Me(this.temporalCookie,"visitedInThisSession")&&!1!==e||(e=!1===e||isNaN(parseInt(e,10))?1:e+1,this.permanentCookie.timesVisited=e,this.temporalCookie.visitedInThisSession=!0,this.markAsModified("permanent"),this.markAsModified("temporal"))}setPagesViewed(){let e=Me(this.temporalCookie,"pagesViewed");e=!1===e||isNaN(parseInt(e,10))?1:e+1,this.temporalCookie.pagesViewed=e,this.markAsModified("temporal")}setLandingPage(e){!1===Me(this.temporalCookie,"landingPage")&&(this.temporalCookie.landingPage=e||W(this.tracker.pageType),this.temporalCookie.referrer=Q(this.tracker.pageType),this.markAsModified("temporal"))}getLandingPage(){var e;return null===(e=this.temporalCookie)||void 0===e?void 0:e.landingPage}setRecirculationSource(e){var t,r;if("back_forward"===(null===(t=performance)||void 0===t||null===(r=t.getEntriesByType)||void 0===r||null===(r=r.call(t,"navigation"))||void 0===r||null===(r=r[0])||void 0===r?void 0:r.type)&&"back forward cache"!==e)this.recirculationSource="back forward";else if(e)this.recirculationSource=e;else{const e=(e=>{const t=((e,t)=>$(e).search.substring(1).split("&").map((e=>e.split("="))).filter((e=>{let[t]=e;return"utm_cmp_rs"===t})).map((e=>{let[t,r]=e;return decodeURIComponent(r)})).shift())(e);return t||(e=>{const t=nt(e),r=ct(),n=ge();return r&&(r[t]||r[n])})(e)})(this.currentPage);e&&(this.recirculationSource=e,(e=>{const t=nt(e),r=ct();r&&(delete r[t],$e("___m_rec",JSON.stringify(r)))})(this.currentPage),(e=>"refresh"===e)(e)&&(this.previousPage=this.canonical))}}saveTemporalCookie(e){const t=this.tracker.isCookieSandboxed?"".concat("___nrbic","_").concat(this.accountId):"___nrbic";e&&qe(t,JSON.stringify(this.temporalCookie),null,"/",this.cookieDomain),Ae(t,this.temporalCookie)}savePermanentCookie(e){const t=this.tracker.isCookieSandboxed?"".concat("___nrbi","_").concat(this.accountId):"___nrbi";if(e){const e=Hn(),{actualUserId:r}=this.userIdManager.getUserId();qe(t,JSON.stringify(this.permanentCookie),e,"/",this.cookieDomain),this.saveAmpPermanentCookie(r)}Ae(t,this.permanentCookie)}saveAmpPermanentCookie(e){e&&qe("compass_uid",e,arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?void 0:Hn(),"/",this.cookieDomain)}saveCookies(){let{force:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.consentManager.getConsent("cookies");this.temporalCookie&&(this.temporalCookieModified||e)&&this.saveTemporalCookie(t),this.permanentCookie&&(this.permanentCookieModified||e)&&this.savePermanentCookie(t)}markAsModified(e){this[e+"CookieModified"]=!0}getReferrer(){return this.previousPage?this.previousPage:Q(this.tracker.pageType)}hasTrackedAds(){return!this.nrGoogleTrackingActive||this.adsTracked}getEngagedTime(){var e;const t=Ue()-this.startPageTime;return"fbia"===(null===(e=this.tracker)||void 0===e?void 0:e.pageType)?t:this.engagementCalculator.getTotalEngagedTime()}async track(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new FormData;return new Promise((t=>{const r=0===this.tick,n="1"===e.get("le");F(this.endpoint,function(e){const t=[];return e.forEach(((e,r)=>{t.push(r+"="+encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,(function(e){return ye[e]})))})),t.join("&")}(e),{needsXHR:r,contentType:"application/x-www-form-urlencoded",keepalive:n&&this.tracker.keepalive},(e=>{let r={};try{r=JSON.parse(e)}catch(e){}var n;this.userIdManager.processIngestResponse(r),r.strategy&&(n=r.strategy,Vr=n.reduce(((e,t)=>Mr(Mr({},e),{},{[t.tick]:t.delay})),{})),r.ads&&(this.adsDelay=r.ads),t()})),r||t()}))}setUserType(e){this.synchronizer.wait("pageInitialized"),this.permanentCookie.userType=e,this.markAsModified("permanent"),this.saveCookies()}getUserId(){return this.userIdManager.getUserId()}getSiteUserId(){return this.permanentCookie.siteUserId}getSessionReferrer(){return this.temporalCookie.referrer}getSessionId(){return this.temporalCookie.sessionId}getPageId(){return this.pageId}getRecirculationSource(){return this.recirculationSource}getFirstVisit(){return this.permanentCookie.firstVisit}getLastVisit(){return this.temporalCookie.previousVisit!==this.permanentCookie.futurePreviousVisit?this.temporalCookie.previousVisit:null}getPageType(){const e=this.tracker.pageType;return e&&Gr(e)?Gr(e):0}getUserType(){return function(e){if("number"==typeof e)return e;let t=parseInt(e||"",10);if(isNaN(t))switch(e){case"anonymous":t=1;break;case"logged":t=2;break;case"paid":t=3;break;default:t=0}return t}(this.permanentCookie.userType)}getTotalPageviews(){return this.temporalCookie.pagesViewed}getSessionDuration(){return Ue()-this.temporalCookie.currentVisitStarted}getEndpointDomain(){return this.endpointDomain}getUserVars(){return this.permanentCookie.userVars}getSessionVars(){return this.temporalCookie.sessionVars}getPageVars(){return Jr}getUrl(){return this.url}getPublishTime(){return this.publishTime}setEcommerceData(e){this.ecommerceData=e}getCanonical(){return this.canonical}setSiteUserId(e){this.permanentCookie.siteUserId=e,this.markAsModified("permanent"),this.saveCookies()}setCookies(e){this.consentManager.setConsent("cookies",e)}getUserConsent(){return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?this.consentManager.getConsent("cookies"):async function(e,t){return e.isInitiated()?e.getConsent(t):await Promise.race([new Promise((e=>setTimeout((()=>e(!0)),5e3))),new Promise((t=>e.onChange((()=>t(!0))))),new Promise((e=>U((()=>e(!0)))))]).then((async()=>e.getConsent(t)))}(this.consentManager,"cookies")}trackAdEvent(e,t){this.adsTracker.trackAdEvent(e,t)&&-1!==this.adsDelay&&(this.adsTracked=!0,qr(),Fr(this.adsDelay,(()=>this.trackPage())))}trackAdRendered(e,t){this.adsTracker.trackAdEventLegacy("slotRenderEnded",e,t)&&-1!==this.adsDelay&&(this.adsTracked=!0,qr(),Fr(this.adsDelay,(()=>this.trackPage())))}async setUserVar(e,t){await this.synchronizer.wait("pageInitialized");const r=[e,t];let n=!0;for(let t=0;t2&&void 0!==arguments[2])||arguments[2])&&await this.synchronizer.wait("pageInitialized"),Xr(e,t),r=t,"closed"===e&&this.setUserVar("lastClosed",r)}async trackConversion(e,t){this.conversion={conv:e,conv_i:t},(async e=>{const t=await(r=on,Promise.resolve(nn().entries[r]))||{};var r;const n=t[e]||0;t[e]=n+1,await function(e,t){return nn().entries[e]=t,Promise.resolve(rn(nn()))}(on,t)})(e),qr(),await this.trackPage()}async trackRecirculationEvent(e){var t,r;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const i=await this.getTrackingCommonData(),o={t:e,m:n.map((e=>{var t,r;return zn(zn({},e),{},{e:(null===(t=(r=e.e).map)||void 0===t?void 0:t.call(r,re))||e.e})})),ac:i.ac,url:i.url,c:i.c,ut:i.ut,fv:i.fv,lv:i.lv,r:i.r,lp:i.lp,pageType:0,sui:i.sui,u:i.u,uc:i.uc,cc:i.cc,n:Ue()};this.tracker.pageType&&"fbia"===this.tracker.pageType&&(o.pageType=2);const a=We(this.accountId);if(a){const{rfv:e,v:t,f:r,r:n}=a;o.rfv=e,o.rfv_r=n,o.rfv_f=r,o.rfv_v=t}return F("".concat(this.getEndpointDomain(),"/recirculation.php"),JSON.stringify(o)),null===(t=this.events)||void 0===t||null===(r=t.emitRecirculation)||void 0===r||r.call(t,o),o}getBasicConfig(){const{actualUserId:e}=this.getUserId();return{ac:this.accountId,co:this.cookieDomain,t:this.temporalCookie.currentVisitStarted,r:this.getSessionReferrer(),url:this.url,c:this.canonical,pp:this.getReferrer(),lp:this.getLandingPage(),p:this.pageId,u:e,s:this.getSessionId(),v:.2}}async getTrackingCommonData(){const{userIdPromise:e}=this.getUserId();return zn(zn({},this.getBasicConfig()),{},{u:await e,ua:window.navigator.userAgent,rs:this.getRecirculationSource(),sui:this.getSiteUserId()||"",ut:this.getUserType(),fv:this.getFirstVisit(),lv:this.getLastVisit(),uvar:this.getUserVars(),svar:this.getSessionVars(),pvar:this.getPageVars(),uc:await this.getUserConsent(),useg:this.getUserSegments(),cc:Ne(this.consentManager)})}async trackPageInternal(){this.tick>0&&(this.performanceStartTime=performance.now());const e=new FormData,{pageNav:t,jsTime:r}=(e=>{if(void 0!==window.performance&&"function"==typeof window.performance.getEntriesByType){const t=window.performance.getEntriesByType("navigation")[0];return Ke=Ke||window.performance.now()-e,Ke>0?{pageNav:t,jsTime:Ke}:{}}return{}})(this.performanceStartTime);null!=r&&(e.append("pt",r),void 0!==t&&void 0!==t.domainLookupEnd&&(e.append("pdns",t.domainLookupEnd-t.domainLookupStart),e.append("pcon",t.connectEnd-t.connectStart),e.append("pfet",t.responseEnd-t.fetchStart),e.append("pnet",t.responseEnd-t.requestStart),e.append("pttf",t.responseStart-t.requestStart),e.append("pint",t.domInteractive),e.append("pdcl",t.domContentLoadedEventEnd),e.append("pdclf",t.duration))),e.append("wv",this.webVitals.hasWebVitals()),e.append("lcp",this.webVitals.lcp),e.append("fid",this.webVitals.fid),e.append("cls",this.webVitals.cls),e.append("fcp",this.webVitals.fcp),e.append("tbt",this.webVitals.tbt),e.append("inp",this.webVitals.inp),this.webVitals.lcpOffender&&e.append("lcp_o",this.webVitals.lcpOffender),this.webVitals.clsOffender&&(e.append("cls_o",this.webVitals.clsOffender),e.append("cls_o_s",this.webVitals.clsOffenderStatus)),this.webVitals.inpOffender&&(e.append("inp_o",this.webVitals.inpOffender),e.append("inp_o_s",this.webVitals.inpOffenderStatus)),Object.entries(this.getBasicConfig()).forEach((t=>{let[r,n]=t;null!=n&&e.append(r,n)}));const n=this.getUserSegments();null!=n&&n.length&&e.append("useg",JSON.stringify(n)),e.append("a",this.tick),e.append("n",Ue());const i=Ue()-this.startPageTime;e.append("et",this.getEngagedTime()),e.append("l",i),e.append("ps",this.startPageTime),e.append("ut",this.getUserType()),e.append("sui",this.getSiteUserId()||""),e.append("sc",ke(0===this.tick)),e.append("fv",this.getFirstVisit()),e.append("lv",this.getLastVisit()),e.append("uvar",JSON.stringify(this.getUserVars())),e.append("svar",JSON.stringify(this.getSessionVars())),e.append("pvar",JSON.stringify(this.getPageVars()));let o=!1;try{o=!!JSON.parse(e.get("pvar")).find((e=>"lastEvent"===e[0]&&e[1]))}catch(e){}o&&e.append("le","1"),this.ecommerceData&&e.append("stock",this.ecommerceData.stock),(this.publishTime||this.updateTime)&&(e.append("uti",this.updateTime),e.append("pti",this.publishTime)),e.append("ads",this.adsTracker.getAds());const a=this.adsTracker.getAdUnits();a.length>0&&e.append("aups",a);const{conv:s,conv_i:c}=this.conversion||{};if(s&&(e.append("conv",s),c&&e.append("conv_i",c),this.conversion=null),this.recirculationSource&&e.append("rs",this.getRecirculationSource()),e.append("uc",o?this.getUserConsent(!1):await this.getUserConsent()),e.append("cc",Ne(this.consentManager)),this.consentManager.getConsent("personalization")){const t=We(this.accountId);if(t){const{rfv:r,v:n,r:i,f:o}=t;e.append("rfv",r),e.append("rfv_v",n),e.append("rfv_r",i),e.append("rfv_f",o)}}return this.tracker.pageType&&e.append("pageType",Gr(this.tracker.pageType)),await this.track(e),this.tick++,e}async collectAndTrackPage(){for(;window[this.trackerName].data.length>0;){const e=window[this.trackerName].data.shift();"userType"===e[0]?this.setUserType(e[1]):"userId"===e[0]?this.setSiteUserId(e[1]):"setCookies"===e[0]?this.setCookies(e[1]):"adRendered"===e[0]?this.adsTracker.trackAdEventLegacy("slotRenderEnded",e[1],e[2]):"userVar"===e[0]?this.setUserVar(e[1],e[2]):"sessionVar"===e[0]?this.setSessionVar(e[1],e[2]):"pageVar"===e[0]?this.setPageVar(e[1],e[2]):"trackConversion"===e[0]?this.trackConversion(e[1],e[2]):"getRFV"===e[0]&&this.getRFV(e[1])}return await this.trackPageInternal()}async trackPage(){(e=>{let t=-1;for(let e=0;e{const r=Object.keys(Vr).map((e=>parseInt(e,10))).sort(((e,t)=>e-t)).reduce(((t,r)=>null===t&&r>e?r:t),null);r&&Ur.callOnTimer(t,Vr[r])})(this.tick,(()=>this.trackPage())),e}getRFV(e){if(!this.consentManager.getConsent("personalization"))return e?e(Ge):Ge;const{userIdPromise:t,actualUserId:r}=this.getUserId();return e?t.then((t=>(async(e,t,r,n)=>{const i=We(e);return i?(r(i),i):((e,t,r,n)=>new Promise((i=>{const o=Xe(e,t,n);F("https://compassdata.mrf.io/rfv.php",o,{needsXHR:!0},(t=>{const n=Je(JSON.parse(t),e);r(n),i(n)}))})))(e,t,r,n)})(this.accountId,t,e,this.getSiteUserId()))):(console.error("Deprecated: please pass a callback to the function getRFV"),((e,t,r)=>We(e)||((e,t,r)=>{const n=new XMLHttpRequest;return n.open("POST","https://compassdata.mrf.io/rfv.php",!1),n.send(Xe(e,t,r)),Je(JSON.parse(n.responseText),e)})(e,t,r))(this.accountId,r,this.getSiteUserId()))}async trackNewPage(e){return this.tick>0&&(await this.trackPageInternal(),this.previousPage=""+this.canonical),X={},await this.initialize(e)}on(e,t){this.dispatcher.on(e,t)}setupConsent(e){const t=()=>{this.saveAmpPermanentCookie(Ve("compass_uid"),this.consentManager.getConsent("cookies"))};this.consentManager.onChange((()=>{this.consentManager.getConsent("cookies")&&this.saveCookies({force:!0}),t()}).bind(this)),t();const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{useCookies:t}=e;if(xe(t))return t;const r=Te("__nrCookieConsent");return xe(r)?r:null}(e);null!==r&&this.consentManager.setConsent("cookies",r)}async getPaywallScore(){const{actualUserId:e}=this.userIdManager.getUserId();return this.consentManager.getConsent("personalization")?(async e=>{const t="".concat(ze,"?").concat(Be(e)),r=await window.fetch(t);if(!r.ok)throw new Error(r.status);const{score:n}=await r.json();return n})({accountId:this.accountId,userId:e,siteUserId:this.getSiteUserId()}):Fe}async predict(){const{actualUserId:e}=this.userIdManager.getUserId(),t=await(async e=>{const t="".concat(He,"?").concat(Be(e)),r=await fetch(t);if(!r.ok)throw new Error(r.status);return await r.json()})({accountId:this.accountId,userId:e,siteUserId:this.getSiteUserId(),totalPageviews:this.getTotalPageviews(),sessionDuration:this.getSessionDuration()});return t.probability&&Xr("predict:probability",t.probability),t}async setRecirculationTracking(){return this.setRecirculationTrackingInternal(!0)}async setRecirculationTrackingInternal(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=Promise.race([this.synchronizer.wait("experimentation").then((e=>e?this.synchronizer.wait("headline"):Promise.resolve())),this.synchronizer.wait("experimentationFailed"),this.synchronizer.wait("experimentationDisabled").then((()=>Promise.resolve())),new Promise((e=>setTimeout(e,3e3)))]),[{layouts:r}]=await Promise.all([this.tracker.rm,t]);await async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{};(()=>{if(window.performance){if(window.performance.navigation&&1===window.performance.navigation.type)return!0;if("function"==typeof window.performance.getEntriesByType)return window.performance.getEntriesByType("navigation").map((e=>e.type)).includes("reload")}return!1})()&&ut("refresh",e),await Mt(),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{observeDomChanges:n=!0,layouts:i=[]}=t,o=n?Rt:Lt;it().forEach((t=>t.shadowRoot&&o(e,t.shadowRoot,{parentNode:t,layouts:i},r))),o(e,document.body,{layouts:i},r)}(t,r,n)}(W(this.tracker.pageType),((e,t)=>{this.trackRecirculationEvent(e,t.map((e=>{let{module:t,links:r,position:n}=e;return{n:t,e:r,p:n}})),"")}),{observeDomChanges:e,layouts:r},(()=>this.dispatcher.dispatch("recirculationChanged"))),this.synchronizer.resolve("recirculationTracking")}setRecirculationConfig(){let{modules:e=[],layouts:t=[],blacklist:r=[],redirectionLinks:n=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.tracker.rm.set((i=>{let{modules:o=[],layouts:a=[],blacklist:s=[],redirectionLinks:c=[]}=i;const u={blacklist:Un([...s,...r]),redirectionLinks:Un([...c,...n]),modules:Un([...o,...e]),layouts:Un([...a,...t])};return this.dispatcher.dispatch("recirculationConfigChanged",zn({},u)),u})),async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};e.modules.length&&(await Mt(),Vt(e),J((()=>{Vt(e)&&t()})),t())}({modules:e,blacklist:r,redirectionLinks:n},(()=>{this.setRecirculationTrackingInternal(!1),this.dispatcher.dispatch("recirculationChanged")}))}getRecirculationConfig(){return this.tracker.rm}setRecirculationModules(e){this.setRecirculationConfig({modules:e})}setConversionButtons(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e&&e.length&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;Ln(e,t),J((()=>{Ln(e,t)}))}(e,this.trackConversion.bind(this))}addUserSegment(e){const t=Me(this.permanentCookie,"userSegments")||[];this.permanentCookie.userSegments=[...t,e],this.markAsModified("permanent"),this.saveCookies()}setUserSegments(e){this.permanentCookie.userSegments="string"==typeof e?e.split(","):e,this.markAsModified("permanent"),this.saveCookies()}removeUserSegment(e){this.permanentCookie.userSegments=this.permanentCookie.userSegments?this.permanentCookie.userSegments.filter((t=>t!==e)):[],this.markAsModified("permanent"),this.saveCookies()}clearUserSegments(){this.permanentCookie.userSegments=[],this.markAsModified("permanent"),this.saveCookies()}getUserSegments(){var e;return(null===(e=this.permanentCookie)||void 0===e?void 0:e.userSegments)||[]}getContext(e){var t;return e?null===(t=this.contextVariables)||void 0===t?void 0:t[e]:this.contextVariables}setContext(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.contextVariables=e}trackPaymentMethod(){(e=>{try{const r=e.getSessionVars();if("hub.marfeel.com"===document.location.host)return;if(window.addEventListener("message",(t=>{if("https://experiences.mrf.io"===t.origin){var r,n,i;if(null!==(r=t.data)&&void 0!==r&&r.activePayment)e.setSessionVar("activePaymentMethod",t.data.activePayment);else if(null!==(n=t.data)&&void 0!==n&&n.retryData&&window.PaymentRequest){var o;const{paymentMethod:r,paymentDetails:n}=null===(o=t.data)||void 0===o?void 0:o.retryData;new PaymentRequest([r],n,{}).canMakePayment().then((t=>{t&&e.setSessionVar("activePaymentMethod","applePay")})).catch((()=>{}))}qn=!1;const a=null===(i=document.body)||void 0===i?void 0:i.querySelector("iframe#".concat("dw-mrf"));a&&document.body.removeChild(a)}})),!qn||!r.activePaymentMethod){var t;const e=document.createElement("iframe");e.id="dw-mrf",e.setAttribute("allow","payment"),e.setAttribute("style","display:none;"),e.src=Vn,null===(t=document.body)||void 0===t||t.appendChild(e),qn=!0}}catch(e){}})(this)}}function Kn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Gn(e){for(var t=1;t{var t,n;null===(t=window)||void 0===t||null===(n=t.top)||void 0===n||n.marfeel.cmd.push(["compass",function(){var t=r((function*(t){return e(yield t.getTrackingCommonData())}));return function(e){return t.apply(this,arguments)}}()])}))}))()}}function Xn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wn(e){for(var t=1;te.transferSize>1e4));if(!t.length){var{connection_kbps:r,connection_type:n}=yield D(oi);return r&&n?"kbps=".concat(r,"&ctyp=").concat(n):""}var i=t.reduce(((e,t)=>t.encodedBodySize>e.encodedBodySize?t:e)),o=i.encodedBodySize/1e3,a=i.responseEnd-i.responseStart,s=Math.round(8*o/(a/1e3)),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e"".concat(encodeURIComponent(t),",").concat(e[t])));return"".concat("cnv","=").concat(t.join(","))}));return function(){return e.apply(this,arguments)}}(),ui=function(){var e,t=arguments.length>1?arguments[1]:void 0;return null===(e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(t,"").replace("true","").split("&").find((e=>e.startsWith("mrfexperiences=")||e.startsWith("mrfexp=")||e.startsWith("mrfdebug="))))||void 0===e?void 0:e.split("=")[1]},li=e=>{if(e){var t=ui(e.hash,"#")||ui(e.search,"?");if(t)return t}return null},di=function(){var e=r((function*(e){var t=e.experienceId;return t&&""!==t?"id=".concat(t):""}));return function(t){return e.apply(this,arguments)}}();function pi(e,t){if("provider"!==e)return t}var fi=function(){var e=r((function*(e){var t,r;if(null===(t=e.externalExperiences)||void 0===t||null===(r=t[ei.FLOWCARDS])||void 0===r||!r.length)return"";var n=e.externalExperiences[ei.FLOWCARDS].map((e=>{var t=e;return"object"==typeof e.renderProps&&(t.renderProps=JSON.stringify(e.renderProps)),t})),i=encodeURIComponent(JSON.stringify(n,pi));return"dflwc=".concat(i)}));return function(t){return e.apply(this,arguments)}}(),hi=function(){var e=r((function*(e){return isNaN(e.firstVisit)?"":"fvst=".concat(e.firstVisit)}));return function(t){return e.apply(this,arguments)}}(),mi="mrfgeo=",vi=function(){var e=r((function*(e){return"geo=".concat((e=>{if(e){var t=e.search.replace("?","").split("&").find((e=>e.startsWith(mi)));if(t)return t.replace(mi,"")}return null})(e.location)||"__INJECT_GEO__")}));return function(t){return e.apply(this,arguments)}}(),gi=function(){var e=r((function*(e){var t=/hubspotutk=(.+?)(?:;|$)/.exec(e.cookies||"");return t?"hutk=".concat(t[1]):""}));return function(t){return e.apply(this,arguments)}}(),yi=function(){var e=r((function*(e){var t=e.pageTechnology?e.pageTechnology:0;return"ptch=".concat(t)}));return function(t){return e.apply(this,arguments)}}(),bi=function(){var e=r((function*(e){return isNaN(e.totalPageViews)?"":"pgv=".concat(e.totalPageViews)}));return function(t){return e.apply(this,arguments)}}(),wi=function(){var e=r((function*(e){if(!e.referrer)return"";var t=encodeURIComponent(e.referrer);return"ppg=".concat(t)}));return function(t){return e.apply(this,arguments)}}();function Oi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pi(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(void 0===t)return e;var r=[...e.filter((e=>e!==t)),t];return r.length>100?r.slice(1):r};function Si(){return Ci.apply(this,arguments)}function Ci(){return(Ci=r((function*(){return(yield D(Ei))||{sites:{}}}))).apply(this,arguments)}function ji(){return(ji=r((function*(e,t){var r,n=yield Si(),i=Pi(Pi({},n),{},{sites:Pi(Pi({},n.sites),{},{[e]:Pi(Pi({},n.sites[e]),{},{readEditorialIds:ki(null===(r=n.sites[e])||void 0===r?void 0:r.readEditorialIds,t.editorialId)})})});return x(Ei,i)}))).apply(this,arguments)}var Ti=function(){var e=r((function*(e){var{siteId:t}=e;if(void 0!==t){var r,n,i=(e=>e.sort(((e,t)=>e-t)).map(((e,t,r)=>{var n=e;return t>0&&(n-=r[t-1]),n})))(null!==(r=null===(n=(yield Si()).sites[t])||void 0===n?void 0:n.readEditorialIds)&&void 0!==r?r:[]);if(i.length>0)return"red=".concat(i.join(","))}return""}));return function(t){return e.apply(this,arguments)}}(),Ai=function(){var e=r((function*(e){if(!e.recirculationSource)return"";var t=encodeURIComponent(e.recirculationSource);return"rsrc=".concat(t)}));return function(t){return e.apply(this,arguments)}}(),Ii=function(){var e=r((function*(e){if(!e.sessionReferrer)return"";var t=new URL(e.sessionReferrer);t.hash="",t.search="";var r=encodeURIComponent(t.toString());return"ref=".concat(r)}));return function(t){return e.apply(this,arguments)}}(),Di=function(){var e=r((function*(e){return isNaN(e.sessionDuration)?"":"sdu=".concat(e.sessionDuration)}));return function(t){return e.apply(this,arguments)}}(),_i=function(){var e=r((function*(e){return isNaN(e.siteId)?"":"sid=".concat(e.siteId)}));return function(t){return e.apply(this,arguments)}}(),xi=function(){var e=r((function*(e){var t,r=Object.assign({},e.targeting,(t=e.compassVars)?[...t.page,...t.user,...t.session].reduce(((e,t)=>{var[r,n]=t;return e[r]=n,e}),{}):{});return 0===Object.keys(r).length?"":Object.keys(r).filter((e=>void 0!==r[e])).map((e=>[e,encodeURIComponent(r[e])].join("="))).join("&")}));return function(t){return e.apply(this,arguments)}}(),Ni=0,Li=1,Ri=7,Mi=4,Ui=7,Vi=864e5;function qi(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()+Mi-(t.getUTCDay()||Ui))),n=new Date(Date.UTC(r.getFullYear(),Ni,Li));return{week:Math.ceil(((r.getTime()-n.getTime())/Vi+1)/Ri),year:r.getUTCFullYear()}}var Fi=function(e){return e.impression="impression",e.close="close",e}({});function zi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Hi(e){for(var t=1;t{var r=Hi({total:{impression:0,close:0}},e||{}),n="w".concat(Gi.week);return r[n]=r[n]||{impression:0,close:0},r[n][t]++,r},Wi=(e,t)=>{var r=Hi({total:{impression:0,close:0}},e||{});return r.total[t]++,r[Ki.getMonth()]=((e,t)=>{var r=Hi({total:{impression:0,close:0}},e||{}),n=Ki.getDate();return r[n]=r[n]||{impression:0,close:0},r[n][t]++,r.total[t]++,r})(r[Ki.getMonth()],t),r};function Qi(){return void 0===Bi&&(Ki=new Date(Date.now()),Gi=qi(Ki),Bi=D(Ji).then((e=>e||{}))),Bi}function Zi(e,t){return Qi().then((r=>{r[e]=function(e,t){var r=Hi({total:{impression:0,close:0},last:{impression:0,close:0}},e||{});return r.total[t]++,r[Ki.getFullYear()]=Wi(r[Ki.getFullYear()],t),r[Gi.year]=Xi(r[Gi.year],t),r.last[t]=Number(Date.now()),r}(r[e],t),x(Ji,r)}))}var $i=function(e){return e.lifetime="l",e.month="m",e.week="w",e.day="d",e}($i||{}),Yi=function(e){return e.last="ls",e}(Yi||{}),eo="c",to=e=>{if(!e)return 0;var t=Date.now()-e;return Math.floor(t/1e3)},ro=(e,t,r,n)=>{var{impression:i,close:o}=n;i>0&&e.has(r)&&t.push(r,String(i)),o>0&&e.has("".concat(eo).concat(r))&&t.push("".concat(eo).concat(r),String(o))},no=new Map([...Object.entries($i),...Object.entries(Yi)].reduce(((e,t)=>{var[r,n]=t;return e.push([r,n]),e.push(["".concat(eo,"_").concat(r),"".concat(eo).concat(n)]),e}),[])),io=function(){var e=r((function*(e){var t,r=new Map(Object.entries(null!==(t=e.userExperiences)&&void 0!==t?t:{}).map((e=>{var[t,r]=e,n=[];return r.forEach((e=>{no.has(e)&&n.push(no.get(e))})),[t,new Set(n)]})));return Qi().then((e=>{var t=Object.entries(e).reduce(((e,t)=>{var[n,i]=t,o=[],a=r.get(n);if(!i||0===i.total.impression||!a)return e;!function(e,t,r){ro(e,t,$i.lifetime,r.total)}(a,o,i);var s=new Date(Date.now()),c=qi(s),u=i[s.getFullYear()],l=i[c.year],d=null==u?void 0:u[s.getMonth()],p=null==d?void 0:d[s.getDate()];!function(e,t,r){r&&ro(e,t,$i.month,r.total)}(a,o,d),function(e,t,r,n){if(r){var i=r["w".concat(n.week)];i&&ro(e,t,$i.week,i)}}(a,o,l,c),function(e,t,r){r&&ro(e,t,$i.day,r)}(a,o,p),((e,t,r)=>{r.last&&ro(e,t,Yi.last,{impression:to(r.last.impression),close:to(r.last.close)})})(a,o,i);var f=o.join("|");return f.length>0?e.concat(n,f):e}),[]);return t.length>0?"uexp=".concat(t.join(",")):""}))}));return function(t){return e.apply(this,arguments)}}(),oo=function(){var e=r((function*(e){return Array.isArray(e.userSegments)?"useg=".concat(e.userSegments.join(",")):""}));return function(t){return e.apply(this,arguments)}}(),ao=function(){var e=r((function*(e){return isNaN(e.userType)?"":"utyp=".concat(e.userType)}));return function(t){return e.apply(this,arguments)}}(),so=e=>{try{return decodeURIComponent(e),!0}catch(e){return!1}},co=function(e){return e.USQP="usqp",e.CAMPAIGN="utm_campaign",e.CONTENT="utm_content",e.MEDIUM="utm_medium",e.SOURCE="utm_source",e}(co||{}),uo={[co.CAMPAIGN]:"u_cpg",[co.CONTENT]:"u_cnt",[co.MEDIUM]:"u_mdm",[co.SOURCE]:"u_src"},lo={canonical_url:"url",client_id:"clid",connection_speed:"cspd",conversions:"cnv",dynamic_flowcards:"dflwc",experience_id:"id",first_visit:"fvst",hubspot_utk:"hutk",page_technology:"ptch",pageviews:"pgv",previous_page:"ppg",recirculation_source:"rsrc",referrer:"ref",session_duration:"sdu",site_id:"sid",targeting:"trg",user_experiences:"uexp",user_type:"utyp",visitor_frequency:"vfrq"},po={url:ti,clid:ri,cspd:si,cnv:ci,debug_experiences:e=>{var t=li(e.location);return Promise.resolve(t?"debug_experiences=".concat(t):"")},dflwc:fi,fvst:hi,geo:vi,hutk:gi,id:di,ptch:yi,pgv:bi,ppg:wi,pti:e=>{var t=e.publishTime;return Promise.resolve(t?"pti=".concat(t):"")},qpa:e=>{var t=e.location,r=[];if(t)for(var n of Array.from(t.searchParams.keys()).reverse())-1===r.indexOf(n)&&r.push(n);return Promise.resolve(r.length>0?"qpa=".concat(r.reverse().join(",")):"")},rsrc:Ai,red:Ti,ref:Ii,sdu:Di,sid:_i,trg:xi,uexp:io,useg:oo,utyp:ao,utms:function(){var e=r((function*(e){var t=e.location;if(!t)return"";var r=Object.values(co);return Array.from(t.searchParams.entries()).filter((e=>{var[t]=e;return r.includes(t)})).map((e=>{var t,[r,n]=e;return"".concat(null!==(t=uo[r])&&void 0!==t?t:r,"=").concat(n)})).filter(so).join("&")}));return function(t){return e.apply(this,arguments)}}(),vfrq:function(){var e=r((function*(e){return e.hasConsent?"":"".concat("vfrq","=").concat("6")}));return function(t){return e.apply(this,arguments)}}()},fo=function(){var e=r((function*(e,t,r){var n=yield Promise.all((e=>{var t=Object.entries(po);if(!e)return t;var r=new Set(Array.from(e.values()).map((e=>{var t;return null!==(t=lo[e])&&void 0!==t?t:e})));return r.add("sid"),r.add("ptch"),t.filter((e=>{var[t]=e;return r.has(t)}))})(r).map((t=>{var[r,n]=t;return n(e)})));return"".concat(t,"?").concat(n.filter((e=>!!e)).join("&"))}));return function(t,r,n){return e.apply(this,arguments)}}();function ho(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mo(e){for(var t=1;te.reduce(((e,t)=>Oo(Oo({},e),{},{[t.origin]:t.goal})),{}),Eo=function(){var e=r((function*(e,t){var r={handlerName:"content",handled:!1};return t.config.accountId&&e.content&&(r.handled=yield function(e,t){return ji.apply(this,arguments)}(t.config.accountId,e.content)),Promise.resolve(r)}));return function(t,r){return e.apply(this,arguments)}}(),ko="mrfExperiment_",So=a(539);function Co(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jo(e){for(var t=1;t{var r;if("object"==typeof e){r=e;for(var n=t.split("."),i=0;i{if(void 0===t)return!0;if(void 0!==e&&"*"===t)return!0;if(e===t)return!0;if(Array.isArray(t)){var r=Array.from(e);if(r.length>=t.length)return t.map(((e,t)=>Io(r[t],e))).every(Boolean)}return"object"==typeof e&&"object"==typeof t&&Object.entries(t).map((t=>{var[r,n]=t;return Io(e[r],n)})).every(Boolean)},Do=(e,t)=>{switch(t.type){case"composite":return Array.isArray(t.value)?t.value.map((t=>Do(e,t))):Object.entries(t.value).reduce(((t,r)=>{var[n,i]=r;return jo(jo({},t),{},{[n]:Do(e,i)})}),{});case"lookup":return t.value?Ao(e,t.value):e;default:return t.value}},_o=e=>{var t,r,n=e.hasTrackedAds();return e.getEngagedTime()>=5&&(n||null===(t=window.googletag)||void 0===t||null===(r=t.cmd)||void 0===r||r.push((()=>{e.setPageVar("mrf::optimized","true"),window.googletag.pubads().refresh()})),!0)};function xo(){return(xo=r((function*(e){var t=yield fo(e,"https://experiences.mrf.io/recommenderexperience/render.json",new Set(["canonical_url","client_id","experience_id"])),r=yield fetch(t),n=yield r.json();return null==n?void 0:n.recommendation}))).apply(this,arguments)}!function(e){e.AMP_DOCUMENT="AMPDocument",e.WIDGET_PROVIDER="WidgetProvider",e.AD_SERVER_PROVIDER="AdServerProvider",e.TEXT_HTML="TextHTML",e.CONTAINER="Container"}(To||(To={}));var No=e=>e.type===To.AMP_DOCUMENT,Lo=e=>e.type===To.TEXT_HTML;function Ro(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mo(e){for(var t=1;t{if(e.has(Uo)){var r={src:e.get(Uo)};return e.has(Vo)&&(r.height=parseInt(e.get(Vo),10)),Mo(Mo({},t),{},{heroElement:r})}return t};function Fo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zo(e){for(var t=1;t{if(e.has(Ho)){var r={url:e.get(Ho)};return zo(zo({},t),{},{canonical:r})}return t},Ko=e=>e.includes("marfeelrecommenderexperienceengine.mrf.io");function Go(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Jo(e){for(var t=1;tr(t,e)),{})}catch(t){throw new Error("".concat(t,"::").concat(e.url))}}))).apply(this,arguments)}function Wo(e){return Qo.apply(this,arguments)}function Qo(){return Qo=r((function*(e){return Object.entries(e).map(function(){var e=r((function*(e){var t,r,[n,i]=e;return r=i.content,(No(r)||Lo(r))&&(t=yield function(e){return Xo.apply(this,arguments)}(i.content)),[n,i,t]}));return function(t){return e.apply(this,arguments)}}()).reduce(function(){var e=r((function*(e,t){var r,n=yield e,[i,o,a]=yield t;return a&&(r=function(e,t){return Jo(Jo({},e),{},{features:Jo(Jo({},e.features),t)})}(o,a)),n[i]=r||o,n}));return function(t,r){return e.apply(this,arguments)}}(),Promise.resolve({}))})),Qo.apply(this,arguments)}function Zo(e,t){return r=>{var n=r.detail;(null==n?void 0:n.owner)===t&&e({uri:n.uri})}}var $o=[];function Yo(){return(Yo=r((function*(e,t){var r=$o.map((r=>r(e,t)));return Promise.all(r).then((()=>Promise.resolve()))}))).apply(this,arguments)}var ea=()=>window.location.hash.includes("mrfdebug"),ta=function(){var e=r((function*(e,t,r){var n,i,o,a,s=ea(),{userIdPromise:c,actualUserId:u}=t.getUserId(),l=s?u:yield c,d=!!s||(yield t.getUserConsent());return function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return fo(e,"https://flowcards.mrf.io/json/experiences",t.length>0?new Set(t):void 0)}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).then(fetch).then((e=>e.json())).then(vo)}({pageTechnology:t.getPageType(),canonical:(null===(n=document.querySelector('link[rel="canonical"]'))||void 0===n?void 0:n.getAttribute("href"))||void 0,location:new URL(window.location.toString()),publishTime:t.getPublishTime(),siteId:e.accountId,externalExperiences:e.experiences,targeting:e.targeting,userId:l,userSegments:t.getUserSegments(),userType:t.getUserType(),userExperiences:null===(i=e.preflight)||void 0===i||null===(o=i.preflight)||void 0===o||null===(a=o.targeting)||void 0===a?void 0:a.frequencyCap,firstVisit:t.getFirstVisit(),recirculationSource:t.getRecirculationSource(),referrer:t.getReferrer(),sessionDuration:t.getSessionDuration(),sessionReferrer:t.getSessionReferrer(),totalPageViews:t.getTotalPageviews(),cookies:document.cookie,compassVars:{user:t.getUserVars(),session:t.getSessionVars(),page:t.getPageVars()},hasConsent:d},r)}));return function(t,r,n){return e.apply(this,arguments)}}();function ra(e,t){var r=document.createElement("script");return r.setAttribute("type","application/javascript"),r.setAttribute("src",e),t&&(r.id=t),r}function na(e){return(t,r)=>{var n=ra(t,r);n.setAttribute("type","module"),e.appendChild(n)}}function ia(e){return(t,r)=>{var n=ra(t,r);n.noModule=!0,n.async=!0,n.defer=!0,e.appendChild(n)}}function oa(e){return(t,r)=>{var n=ra(t,r);e.appendChild(n)}}function aa(e){return"marfeel-".concat(e)}function sa(e){return function(e){return document.querySelector(aa(e))}(e)||function(e){return document.body.appendChild(document.createElement(aa(e)))}(e)}var ca,ua=function(){var e=r((function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{onInteraction:r=!0,strategy:n="async"}=t;return(e=>{var t="string"!=typeof e?e.module:e;return!!document.querySelector('script[src="'.concat(t,'"]'))})(e)?Promise.resolve():(r?function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e4,r=["touchstart","click","scroll"];return new Promise((n=>{var i=()=>{r.forEach((e=>((e,t)=>{document.removeEventListener(e,t)})(e,i))),window.clearTimeout(e),n()};r.forEach((e=>((e,t)=>{document.addEventListener(e,t,{passive:!0})})(e,i))),e=window.setTimeout(i,t)}))}():Promise.resolve()).then((()=>{"sync"===n?"string"!=typeof e?(function(){na(document.head)(...arguments)}(e.module),function(){ia(document.head)(...arguments)}(e.nomodule)):function(){oa(document.head)(...arguments)}(e):"string"!=typeof e?(function(){na(document.body)(...arguments)}(e.module),function(){ia(document.body)(...arguments)}(e.nomodule)):function(){oa(document.body)(...arguments)}(e)}))}));return function(t){return e.apply(this,arguments)}}(),la=function(){var e=r((function*(e){var t;p(l.INIT_HANDLE_EXPERIMENTATION);var r=null===(t=e.experimentation)||void 0===t?void 0:t.actions,n={handlerName:ei.EXPERIMENTATION,handled:!1};return r&&(yield Promise.all(Object.values(r).map((e=>{var{url:t}=e,r=new URL(t),n=r.searchParams.get("experimentType");if(null!==n&&document.querySelector('[src*="experimentType='.concat(n,'"]')))return Promise.resolve();var i=new URL(t);return r.searchParams.append("version","esnext"),i.searchParams.append("version","legacy"),ua({module:r.toString(),nomodule:i.toString()},{onInteraction:!1,strategy:"sync"})}))),n.handled=!0),f(l.INIT_HANDLE_EXPERIMENTATION,l.END_HANDLE_EXPERIMENTATION,{jsonResponse:e}),Promise.resolve(n)}));return function(t){return e.apply(this,arguments)}}();var da="complete",pa="interactive",fa="loading",ha=()=>document.readyState===da,ma=()=>document.readyState===pa,va=()=>{var e;return document.readyState===fa&&!(null===(e=document.head)||void 0===e||!e.appendChild)},ga=function(){var e=r((function*(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:da;return new Promise((t=>{var r=(e=>{switch(e){case fa:return[va,ma,ha];case pa:return[ma,ha];default:return[ha]}})(e),n=()=>r.some((e=>e()));n()?t():document.addEventListener("readystatechange",(()=>{n()&&t()}))}))}));return function(){return e.apply(this,arguments)}}();function ya(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ba(e){for(var t=1;tPromise.resolve())}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};p(l.INIT_HANDLE_INLINE_EXPERIENCE);var o=t[e]||{actions:{}},a=o.actions||{},s={handlerName:e,handled:!1};if(Object.keys(a).length>0){yield i();var c=ba(ba({},o),{},{actions:yield Wo(o.actions)});yield ga(n),function(e,t){var r=document.createElement("script");r.setAttribute("type","application/json"),r.innerHTML=JSON.stringify(t);var n=sa(e);n.appendChild(r),n.setAttribute("initialization","inline")}(e,c),yield r(c),s.handled=!0}return f(l.INIT_HANDLE_INLINE_EXPERIENCE,l.END_HANDLE_INLINE_EXPERIENCE,{type:e,jsonResponse:t}),s}));return function(t,r,n){return e.apply(this,arguments)}}();function Oa(e,t){return t.id||e}function Pa(e,t){Object.entries(t.actions).forEach((t=>{var[r,n]=t,i=function(e){var t;return(null===(t=e.features.canonical)||void 0===t?void 0:t.url)||(No(e.content)||Lo(e.content)?e.content.url:e.content.type===To.WIDGET_PROVIDER||(e=>e.type===To.AD_SERVER_PROVIDER)(e.content)?e.content.name:void 0)}(n);i&&e.trackRecirculationEvent("elegible",[{n:Oa(r,n),e:[i]}],"")}))}var Ea,ka,Sa="//flowcards.mrf.io/statics/experience-web",Ca="".concat(Sa,"/index.es2015.standalone.js"),ja="".concat(Sa,"/index.es5.standalone.js"),Ta=function(){var e=r((function*(e,t){if(matchMedia("only screen and (min-width:800px)").matches)return{handlerName:ei.FLOWCARDS,handled:!1};var{compassSDK:n}=t;return wa(ei.FLOWCARDS,e,function(){var e=r((function*(e){var t;Pa(n,e),yield ua({module:Ca,nomodule:ja}),t=sa(ei.FLOWCARDS),ca=[],t.addEventListener("snappointchange",(e=>{var{snapPoint:t,cardId:r}=e.detail;(function(e){return"initial"===e||"active"===e})(t)&&!function(e){return ca.indexOf(e)>-1}(r)&&function(e){ca.push(e),Zi(e,Fi.impression)}(r)}))}));return function(t){return e.apply(this,arguments)}}())}));return function(t,r){return e.apply(this,arguments)}}(),Aa=(e,t)=>e.includes(t),Ia="https://experiences.mrf.io/statics/inline-experiences",Da="".concat(Ia,"/esnext/standalone.js"),_a="".concat(Ia,"/legacy/standalone.js"),xa=function(){var e=r((function*(e){return wa(ei.INLINE,e,function(){var e=r((function*(e){var t,{actions:r={}}=e;null===(t=window.mrfInlineExperiences)||void 0===t||t.init(),(e=>{Ea=[],ka=[],Object.entries(e).forEach((e=>{var t,[r,n]=e;Aa(Ea,n.id)||(t=n.id,Ea.push(t),Zi(t,Fi.impression))})),document.addEventListener("mrfCloseInline",(e=>{var t,r=null===(t=e.detail)||void 0===t?void 0:t.id;Aa(ka,r)||(ka.push(r),Zi(r,Fi.close))}))})(r)}));return function(t){return e.apply(this,arguments)}}(),{documentState:pa,prepare:(t=r((function*(){yield ga(fa),yield ua({module:Da,nomodule:_a},{onInteraction:!1,strategy:"sync"})})),function(){return t.apply(this,arguments)})});var t}));return function(t){return e.apply(this,arguments)}}();function Na(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function La(e){for(var t=1;t{var{moduleName:t,config:r}=e;window.marfeel.cmd.push(["loader",function(e){e.load(t,r)}])})),o.handled=!0),Promise.resolve(o)}));return function(t){return e.apply(this,arguments)}}(),Ma=function(){var e=r((function*(e,t){var{contextExposition:r}=e,n=(null==r?void 0:r.actions)||{},i={handlerName:ei.CONTEXT_EXPOSITION,handled:!1};return Object.keys(n).length&&(i.handled=!0,Object.values(n).forEach((e=>{var{contextVariables:r}=e;try{r&&t.compassSDK.setContext(JSON.parse(r))}catch(e){console.error("not valid JSON for the contextExposition experience")}}))),Promise.resolve(i)}));return function(t,r){return e.apply(this,arguments)}}(),Ua="closed",Va=function(){var e=r((function*(e,t){var r,n,i=yield t.wait("piano-offer");return!("purchase"!==i.offerType||("inline"===i.displayMode?(e.compassSDK.setPageVar(Ua,"hard-paywall"),0):"modal"!==i.displayMode||!i.activeMeters||"DefaultMeter"!==(r=i.activeMeters,n=JSON.parse(r),Array.isArray(n)?n[0]:n).meterName||(e.compassSDK.setPageVar(Ua,"dynamic-paywall"),0)))}));return function(t,r){return e.apply(this,arguments)}}(),qa="piano subscribe",Fa=function(){var e=r((function*(e,t,r){var n,i=yield r.wait("piano-subscription"),o=t.find((e=>e.rid===i.rid));return!!o&&(e.compassSDK.trackConversion(null!==(n=o.conversion)&&void 0!==n?n:qa),!0)}));return function(t,r,n){return e.apply(this,arguments)}}(),za=function(){var e=r((function*(e,t,n){var i,o,a=yield Promise.all(t.map(function(){var t=r((function*(t){if(yield((e,t)=>new Promise((r=>{e.api.callApi("/access/check",{rid:t},(function(e){var t=e.access.granted;return r(t)}))})))(e,t.rid))return t}));return function(e){return t.apply(this,arguments)}}()));n.compassSDK.setUserType(null!==(i=null===(o=a.find(Boolean))||void 0===o?void 0:o.userType)&&void 0!==i?i:"logged")}));return function(t,r,n){return e.apply(this,arguments)}}(),Ha=function(){var e=r((function*(e,t){var r,n,i=null!==(r=null===(n=e.pianoId.getUser())||void 0===n?void 0:n.uid)&&void 0!==r?r:void 0;if(!i)try{var o,a;i=JSON.parse(atob(null===(o=e.pianoId.getToken())||void 0===o||null===(a=o.split("."))||void 0===a?void 0:a[1])).sub}catch(e){}i&&t.compassSDK.setSiteUserId(i)}));return function(t,r){return e.apply(this,arguments)}}(),Ba=function(){var e=r((function*(){if(window.tp&&!Array.isArray(window.tp)||(yield new Promise((e=>{!function(){window.tp=window.tp||[],Array.isArray(window.tp)&&window.tp.push(arguments)}("init",e)}))),window.tp&&!Array.isArray(window.tp))return window.tp}));return function(){return e.apply(this,arguments)}}(),Ka=e=>Array.isArray(e.resources)?e.resources:e.rid.split(";").map((e=>({rid:e,userType:3,conversion:qa}))),Ga=function(){var e=r((function*(e,t,r,n){return!(!e.pianoId.isUserValid()&&!e.user.isUserValid()||(yield za(e,r,n),t&&e.pianoId.isUserValid()&&(yield Ha(e,n)),0))}));return function(t,r,n,i){return e.apply(this,arguments)}}(),Ja=function(){var e=r((function*(e,t,n){var i,o=null===(i=e.piano)||void 0===i?void 0:i.actions,a={handlerName:ei.PIANO,handled:!1};if(o){var s=Object.values(o).map(Ka).reduce(((e,t)=>[...e,...t]),[]),c=Object.values(o).some((e=>null==e?void 0:e.deviceUnification));return new Promise((e=>{Promise.all([Va(t,n),Fa(t,s,n),Ba().then(function(){var e=r((function*(e){return new Promise((n=>{if(!e)return n();var i=0,o=setInterval(r((function*(){if((yield Ga(e,c,s,t))||i>=3)return clearInterval(o),n();i+=1})),5e3)}))}));return function(t){return e.apply(this,arguments)}}())]).then((()=>{a.handled=!0,e(a)}))}))}return Promise.resolve(a)}));return function(t,r,n){return e.apply(this,arguments)}}(),Xa=function(){var e=r((function*(){if(!document.querySelector(".js_smartbanner")){var[e]=yield Promise.all([a.e(512).then(a.bind(a,512)),a.e(376).then(a.bind(a,376))]);(new e.default).publish()}}));return function(){return e.apply(this,arguments)}}(),Wa=function(){var e=r((function*(e){[["smartbanner:title",e.title],["smartbanner:author",e.author],["smartbanner:price","GET"],["smartbanner:price-suffix-google"," - In Google Play"],["smartbanner:price-suffix-apple"," - On the App Store"],["smartbanner:icon-google",e.icon],["smartbanner:icon-apple",e.icon],["smartbanner:button-url-google","https://play.google.com/store/apps/details?id=".concat(e.androidId)],["smartbanner:button-url-apple","https://apps.apple.com/app/id".concat(e.iosId)],["smartbanner:enabled-platforms","android,ios"],["smartbanner:button","VIEW"],["smartbanner:custom-design-modifier","marfeel"],["smartbanner:api","true"]].forEach((e=>{var[t,r]=e;return((e,t)=>{var r=document.createElement("meta");r.name=e,r.content=t,document.head.appendChild(r)})(t,r)})),yield Xa()}));return function(t){return e.apply(this,arguments)}}(),Qa=function(){var e=r((function*(e,t){var r,n=null===(r=e.appBanner)||void 0===r?void 0:r.actions,i={handlerName:ei.APP_BANNER,handled:!1};if(n){var o=Object.values(n)[0];o&&(yield Wa(o),i.handled=!0)}return i}));return function(t,r){return e.apply(this,arguments)}}(),Za=a(136),$a=(e,t,r,n)=>{var i=document.createElement("button");return i.appendChild(((e,t,r)=>{var n=document.createElement("div"),i=document.createElement("p"),o=document.createElement("p");if(i.innerText=e,i.classList.add("mrf-pay__btn-info"),o.innerText=t,o.classList.add("mrf-pay__btn-details"),null!==r){var a=document.createElement("span");a.innerHTML=r,a.classList.add("mrf-pay__btn-details-logo"),o.append(a)}return n.append(i,o),n})(e,t,n)),i.onclick=r,i.classList.add("mrf-pay__btn","didomi-button"),i},Ya=()=>{var e;return null===(e=document.querySelector("#didomi-host .didomi-buttons"))||void 0===e?void 0:e.classList.add("mrf-pay-loaded")},es=function(){var e=r((function*(e,t){var{country:n,currency:i,amount:o}=e;Promise.resolve().then(a.bind(a,729)),Za.loadStripe.setLoadParameters({advancedFraudSignals:!1});var s=yield(0,Za.loadStripe)("pk_live_51OAsSrI9IMiECPdnF7Uxe0ajMEjUomCmf270a3bsb0j9egZrTK0Bn1FrqzATJY9ZKtDkT5hXHbEztxBlv9JRqsk10072m1l8PK");if(s){window.setTimeout(Ya,5e3);var c,u=s.paymentRequest({country:n,currency:i,total:{label:"marfeel pay",amount:30},requestPayerEmail:!0,requestPayerName:!0}),l=s.paymentRequest({country:n,currency:i,total:{label:"marfeel pay",amount:299},requestPayerEmail:!0,requestPayerName:!0}),d=yield u.canMakePayment(),p=yield l.canMakePayment(),f=document.querySelector("#didomi-host #buttons"),h=null==f?void 0:f.querySelector("#didomi-notice-learn-more-button");if(f&&h&&d&&p&&(d.applePay||d.googlePay||d.link)){null==(c=document.querySelector("#didomi-notice-agree-button"))||c.style.setProperty("--mrf-pay-loader-color",window.getComputedStyle(c).getPropertyValue("color"));var m=((e,t,r)=>{var n=(e=>e.applePay?'\n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n':e.googlePay?'\n\n\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n':null)(r),i=document.createElement("div");i.classList.add("mrf-pay");var o=document.createElement("p");o.textContent="...O RECHAZAR Y CONTINUAR";var a=$a("24h sin publicidad","0,30€",(()=>{e.show()}),n),s=$a("1 mes sin publicidad","2,99€",(()=>{t.show()}),n),c=document.createElement("span");return i.append(o,a,s,c),i})(u,l,d);f.removeChild(h),f.appendChild(m)}Ya();var v=(e,n)=>{e.on("paymentmethod",function(){var e=r((function*(e){var{error:r,clientSecret:o}=yield fetch("https://experiences.mrf.io/marfeelpass/stripe/api/create-payment-intent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({currency:i,amount:n,paymentMethodType:e.paymentMethod.type,email:e.payerEmail,address:null,customer:null})}).then((e=>e.json()));if(r)e.complete("fail");else{var a,{error:c,paymentIntent:u}=yield s.confirmCardPayment(o,{payment_method:e.paymentMethod.id},{handleActions:!1});c?e.complete("fail"):(null===(a=window.Didomi)||void 0===a||a.setUserDisagreeToAll(),(e=>{2223===Number(e.config.accountId)&&(()=>{var e;null!=(e=document.getElementById("acceptationCMPWall"))&&(e.style.display="none"),document.body.style.overflow="",__tcfapi("getTCData",2,((e,t)=>{window.cmpConsentString=t?e.tcString:void 0}),[1,2,3])})()})(t),e.complete("success"),"requires_action"===(null==u?void 0:u.status)&&(yield s.confirmCardPayment(o)))}}));return function(t){return e.apply(this,arguments)}}())};v(u,30),v(l,299)}else Ya()}));return function(t,r){return e.apply(this,arguments)}}(),ts=a(595),rs=["www.amazon","/dp/"],ns="asc_refurl",is="asc_source",os="asc_campaign";const as=new class{isAffiliateUrl(e){return rs.every((t=>e.includes(t)))}getModifiedUrl(e,t){var r=new URL(e),n=r.searchParams.get(ns),i=r.searchParams.get(os),o=r.searchParams.get(is);return!n&&t.url&&r.searchParams.set(ns,t.url),!o&&t.source&&r.searchParams.set(is,t.source),!i&&t.campaign&&r.searchParams.set(os,t.campaign),{isCorrect:!!n&&!!o&&!!i,url:r.toString()}}};var ss=[as],cs=(e,t)=>{[...document.querySelectorAll("a")].filter((e=>!!e.href)).forEach((r=>{try{var n,{url:i,isValid:o,build:a}=((e,t)=>{var r=new URL(e);if(t){var n=r.searchParams.get(t);return{isValid:!!n,build:e=>(r.searchParams.set(t,encodeURIComponent(e)),r.toString()),url:n?decodeURIComponent(decodeURIComponent(n)):""}}return{isValid:!0,build:e=>e,url:r.toString()}})(r.href,t);if(!o)return;var s=null===(n=ss.filter((e=>e.isAffiliateUrl(i))))||void 0===n?void 0:n[0];if(!s)return;var{isCorrect:c,url:u}=s.getModifiedUrl(i,e);c||(r.href=a(u))}catch(e){}}))},us=[[(e,t)=>{var r,n,i,o={handlerName:"experiments",handled:!1};if(e.experiments){var a=(r=e.experiments,n=t.compassSDK,i=n.getUserVars(),r.filter((e=>{var{name:t}=e;return!i.some((e=>{var[r]=e;return r==="".concat(ko).concat(t)}))})));o.handled=function(e,t){return 0!==e.length&&(e.forEach((e=>{var{name:r,group:n}=e;t.setUserVar("".concat(ko).concat(r),n.toString())})),!0)}(a,t.compassSDK)}return Promise.resolve(o)}]],ls=[[xa],[(e,t)=>{var{compass:r={actions:{}},recirculation:n={actions:{}},conversions:i={actions:{}}}=e,o=Object.values(yo(yo(yo({},null==r?void 0:r.actions),null==n?void 0:n.actions),null==i?void 0:i.actions)),a={handlerName:"compass",handled:!1};if(o.length){var s={layouts:[],modules:[],blacklist:[],redirectionLinks:[]};Object.values(o).forEach((e=>{var{recirculationModules:r=[],userType:n,userVars:i={},conversionButtons:o=[],layouts:a=[],blacklist:c=[],redirectionLinks:u=[]}=e;t.compassSDK.setConversionButtons(o),void 0!==n&&t.compassSDK.setUserType(n),Object.entries(i).forEach((e=>{var[r,n]=e;return t.compassSDK.setUserVar(r,n)})),s.modules.push(...r),s.layouts.push(...a),s.blacklist.push(...c),s.redirectionLinks.push(...u)})),t.compassSDK.setRecirculationConfig(s),a.handled=!0}return Promise.resolve(a)}],[e=>{var{adManager:t}=e,r={handlerName:"ad-manager",handled:!1};return null!=t&&t.actions&&(Object.values(t.actions).forEach((e=>{var t,{targeting:r}=e;(t=r)&&(window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],t.forEach((e=>{var{key:t,value:r}=e;window.googletag.cmd.push((()=>{window.googletag.pubads().setTargeting(t,r)}))})))})),r.handled=!0),Promise.resolve(r)},Eo,la,Ta,(e,t)=>{var r,n=null===(r=e.googleOptimize)||void 0===r?void 0:r.actions,i={handlerName:ei.GOOGLE_OPTIMIZE,handled:!1};if(n){var o=Object.values(n).map((e=>{var{experiments:t}=e;return t})).reduce(((e,t)=>(t.forEach((t=>e.add(t))),e)),new Set);if(o.size>0)return new Promise((e=>{!function(){window.dataLayer=window.dataLayer||[],window.dataLayer.push(arguments)}("event","optimize.callback",{callback:(r,n)=>{o.has(n)&&(t.compassSDK.setUserVar("optimize-".concat(n),r),o.delete(n)),0===o.size&&(i.handled=!0,e(i))}})}))}return Promise.resolve(i)},Ja,e=>{var t,r=null===(t=e.socialAcquisition)||void 0===t?void 0:t.actions,n={handlerName:ei.SOCIAL_ACQUISITION,handled:!1};return r&&(Object.values(r).forEach((e=>{var{pixelId:t}=e;(e=>{var{pixelId:t}=e;!function(e,t,r,n,i,o,a){e.fbq||(i=e.fbq=function(){i.callMethod?i.callMethod.apply(i,arguments):i.queue.push(arguments)},e._fbq||(e._fbq=i),i.push=i,i.loaded=!0,i.version="2.0",i.queue=[],(o=t.createElement(r)).async=!0,o.src="https://connect.facebook.net/en_US/fbevents.js",(a=t.getElementsByTagName(r)[0]).parentNode.insertBefore(o,a))}(window,document,"script"),window.fbq("init",t),window.fbq("track","PageView")})({pixelId:t})})),n.handled=!0),Promise.resolve(n)},(e,t)=>{var{goalTracking:r}=e,n={handlerName:"goalTracking",handled:!1};return null!=r&&r.actions&&(Object.values(r.actions).forEach((e=>{var{goals:r}=e;null==r||r.forEach((e=>t.compassSDK.trackConversion(e)))})),n.handled=!0),Promise.resolve(n)},(e,t)=>{var{genericGoalTracking:r}=e,n={handlerName:"genericGoalTracking",handled:!1},i=!1;if(null!=r&&r.actions){var o,a,s=Object.values(r.actions).reduce(((e,t)=>((e[t.source]=e[t.source]||[]).push(t),e)),{});if((null===(o=s[bo.POST_MESSAGE])||void 0===o?void 0:o.length)>0){var c=Po(s[bo.POST_MESSAGE]);window.addEventListener("message",(e=>{if(Object.keys(c).includes(e.origin)){var r,n;try{n=JSON.parse(e.data)}catch(e){return}"complete"!==n.event&&("close"!==n.event&&"purge"!==n.event||null===(r=n.params)||void 0===r||!r.completePayment)||i||(i=!0,t.compassSDK.trackConversion(c[e.origin]))}})),n.handled=!0}if((null===(a=s[bo.HTTP])||void 0===a?void 0:a.length)>0){var u=Po(s[bo.HTTP]),l=window.fetch,d=window.XMLHttpRequest.prototype.open;window.fetch=(e,r)=>{var n=l(e,r);return Object.keys(u).includes(e)&&n.then((r=>{r.ok&&t.compassSDK.trackConversion(u[e])})),n},window.XMLHttpRequest.prototype.open=function(){d.apply(this,arguments);try{var e=new URL(arguments[1]);Object.keys(u).includes(e.origin)&&t.compassSDK.setPageVar(u[e.origin],"true")}catch(e){}},n.handled=!0}}return Promise.resolve(n)},Ra,(e,t)=>{var{siteContextSynchronizer:r}=e,n={handlerName:"siteContextSynchronizer",handled:!1};return null!=r&&r.actions&&(Object.values(r.actions).forEach((e=>{e.definition.forEach((e=>{return r=e,n=t.compassSDK,i=0,o=(e,t)=>{var r=Do(e,t.params);switch(function(e){return void 0!==(null==e?void 0:e.name)}(t.action)?t.action.name:t.action){case"userType":"string"!=typeof r&&"number"!=typeof r||n.setUserType(r);break;case"conversion":"string"==typeof r&&n.trackConversion(r);break;case"marfeelCMD":var i=t.action;window.marfeel.cmd.push([i.config.module,e=>{var t;Array.isArray(r)&&(null==e||null===(t=e[i.config.method])||void 0===t||t.call(e,...r))}])}},a=e=>{for(var t of r.effects)if(Io(e,t.condition))return void o(e,t)},(s=function e(){var t,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],o=r.path.startsWith("window.")?r.path.substring(7):r.path,s=Ao(window,o);if(s)if("array"===r.type){if(Array.isArray(s)){for(var c=i;c0&&setTimeout((()=>e()),u)})(),void(0,So.C)((()=>{s(!1)}));var r,n,i,o,a,s}))})),n.handled=!0),Promise.resolve(n)},Ma,Qa,(e,t)=>{var{marfeelOptimizer:r}=e,n={handlerName:"marfeelOptimizer",handled:!1};return null!=r&&r.actions&&Object.values(r.actions).length>0?new Promise((e=>{var r=_o(t.compassSDK),n=0;if(r)return e();var i=setInterval((()=>{if(_o(t.compassSDK)||n>=2)return clearInterval(i),e();n+=1}),5e3)})).then((()=>(n.handled=!0,Promise.resolve(n)))):Promise.resolve(n)},(e,t)=>{var r,n=null===(r=e.marfeelPay)||void 0===r?void 0:r.actions,i={handlerName:ei.MARFEEL_PAY,handled:!1};if(n){var o,a=(null===(o=li(new URL(window.location.href)))||void 0===o?void 0:o.split(","))||[],s=!1;Object.values(n).filter((e=>{var{id:t}=e;return a.includes(t)})).forEach((e=>{(e=>{window.didomiOnReady=window.didomiOnReady||[],window.didomiOnReady.push((t=>{if(null!=t&&t.notice.isVisible())e();else if(!t.isUserConsentStatusPartial()){window.didomiEventListeners=window.didomiEventListeners||[],window.didomiEventListeners.push({event:"notice.shown",listener:e});try{t.notice.show()}catch(e){}}}))})((()=>{es(e,t)})),s=!0})),i.handled=s}return Promise.resolve(i)},e=>{var t,r=null===(t=e.affiliationEnhancer)||void 0===t?void 0:t.actions,n={handlerName:ei.AFFILIATION_ENHANCER,handled:!1};return r&&(Object.values(r).forEach((e=>{var{context:t,queryParam:r}=e;((e,t)=>{cs(e,t),(0,ts.N)((()=>{cs(e,t)}))})(JSON.parse(t),r)})),n.handled=!0),Promise.resolve(n)}]],ds=function(){var e=r((function*(e,t,r,n){var i=[];for(var[o,a]of e.entries()){p(l.INIT_HANDLE_ACTION);var s=yield Promise.all(a.map((e=>e(t,r,n))));f(l.INIT_HANDLE_ACTION,l.END_HANDLE_ACTION,{index:o}),i.push(...s)}return i}));return function(t,r,n,i){return e.apply(this,arguments)}}(),ps=(e,t,r)=>ds(ls,e,t,r);class fs{constructor(){i(this,"promise",void 0),i(this,"promiseResolve",void 0),this.promise=new Promise((e=>{this.promiseResolve=e}))}resolve(){var e;null===(e=this.promiseResolve)||void 0===e||e.call(this)}}var hs=function(e){return e.NOT_EQUALS="NOT_EQUALS",e.EQUALS="EQUALS",e}({}),ms=e=>e.replace(/\/+$/,""),vs=(e,t)=>e.hostname===t.hostname&&ms(e.pathname)===ms(t.pathname),gs=function(){var e=r((function*(e){var t=window.location;switch(e.operator){case hs.NOT_EQUALS:return e.values.every((e=>!vs(t,new URL(e))));case hs.EQUALS:default:return e.values.some((e=>vs(t,new URL(e))))}}));return function(t){return e.apply(this,arguments)}}(),ys=function(){var e=r((function*(e,t){if(ea()||e.operator!==hs.EQUALS)return!0;var n=function(){var e=r((function*(){return new Promise((e=>{if(window.didomiConfig)return window.didomiOnReady=window.didomiOnReady||[],void window.didomiOnReady.push((t=>{e(t.shouldConsentBeCollected())}));t.consentSDK.hasToPromptForConsent(e)}))}));return function(){return e.apply(this,arguments)}}();return!!(yield n())||!function(e){var t=new RegExp("(^|;) ?".concat("mrfpass","=([^;]*)(;|$)")).exec(document.cookie);return t?t[2]:null}()&&e.values.some((e=>!t.consentSDK.hasConsentForPurpose(+e)))}));return function(t,r){return e.apply(this,arguments)}}(),bs="pendingConsent";function ws(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Os(e){for(var t=1;te!==t));case hs.EQUALS:default:return e.values.some((e=>e===t))}}));return function(t){return e.apply(this,arguments)}}(),Es=function(){var e=r((function*(e){var t=document.documentElement.lang||"None";switch(e.operator){case hs.NOT_EQUALS:return e.values.every((e=>e!==t));case hs.EQUALS:default:return e.values.some((e=>e===t))}}));return function(t){return e.apply(this,arguments)}}(),ks=function(){var e=r((function*(e){var[t,r="/"]=window.location.pathname.split("/"),n="/"!==r?"/".concat(r,"/"):r;switch(e.operator){case hs.NOT_EQUALS:return e.values.every((e=>e!==n));case hs.EQUALS:default:return e.values.some((e=>e===n))}}));return function(t){return e.apply(this,arguments)}}(),Ss=function(){var e=r((function*(e){var t,r=(null==(t=window.navigator.language||window.navigator.userLanguage)?void 0:t.split("-")[0].toLowerCase())||"en";switch(e.operator){case hs.NOT_EQUALS:return e.values.every((e=>e!==r));case hs.EQUALS:default:return e.values.some((e=>e===r))}}));return function(t){return e.apply(this,arguments)}}();function Cs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function js(e){for(var t=1;tfunction(){var t=r((function*(t){switch(t.operator){case hs.NOT_EQUALS:return t.values.every((t=>t!==e));case hs.EQUALS:default:return t.values.some((t=>t===e))}}));return function(e){return t.apply(this,arguments)}}();function As(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Is(e){for(var t=1;te.compassSDK.getUserVars().map((e=>{var[t,r]=e,n=Ts(r.toString());return{[t]:n,["".concat("userVar::").concat(t)]:n}})).reduce(((e,t)=>js(js({},e),t)),{})],Ns=function(){var e=r((function*(e,t){return Promise.all(e.map(t)).then((t=>e.filter(((e,r)=>t[r]))))}));return function(t,r){return e.apply(this,arguments)}}(),Ls=[e=>(e=>"content"in e)(e)&&Lo(e.content)&&e.content.url.includes("marfeelpassexperienceengine.mrf.io")?Os(Os({},e),{},{filters:[...e.filters||[],{operator:hs.EQUALS,values:["1","2","3","4","5","6","7","8","9","10","11"],key:bs}]}):e],Rs=function(){var e=r((function*(e,t,r){return!Array.isArray(e.filters)||0===e.filters.length||(yield Promise.all(e.filters.map((e=>{var n=r[e.key];return!n||n(e,t)})))).every(Boolean)}));return function(t,r,n){return e.apply(this,arguments)}}(),Ms=function(){var e=r((function*(e,t){if(!e.actions)return e;var r=yield t(e.actions);return 0!==r.length?Is(Is({},e),{},{actions:r.reduce(((e,t)=>{var[r,n]=t;return Is(Is({},e),{},{[r]:n})}),{})}):void 0}));return function(t,r){return e.apply(this,arguments)}}(),Us=function(){var e=r((function*(e,t){return Object.entries(e).reduce(function(){var e=r((function*(e,r){var[n,i]=r,o=yield((e,t)=>{var r=(e=>{var t=xs.map((t=>t(e))).reduce(((e,t)=>Is(Is({},e),t)),{});return Is(Is({},_s),t)})(t);return Ms(e,(e=>Ns(Object.entries(e),(e=>{var n,[i,o]=e;return Rs((n=o,Ls.reduce(((e,t)=>t(e)),n)),t,r)}))))})(i,t);return o?Is(Is({},yield e),{},{[n]:o}):e}));return function(t,r){return e.apply(this,arguments)}}(),Promise.resolve({}))}));return function(t,r){return e.apply(this,arguments)}}(),Vs=function(){var e=r((function*(e){var t=li(new URL(window.location.href));return t&&Ds.some((e=>t.startsWith(e)))?Object.entries(e).reduce(function(){var e=r((function*(e,r){var[n,i]=r,o=yield((e,t)=>Ms(e,(e=>Ns(Object.entries(e),(e=>{var[r,n]=e;return((e,t)=>Promise.resolve(t.some((t=>e.id===t))))(n,t)})))))(i,t.split(","));return o?Is(Is({},yield e),{},{[n]:o}):e}));return function(t,r){return e.apply(this,arguments)}}(),Promise.resolve({})):Promise.resolve(e)}));return function(t){return e.apply(this,arguments)}}();function qs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fs(e){for(var t=1;t{var t=e(),r=new Promise((e=>{window.setTimeout((()=>{e(void 0)}),3e3)}));return Promise.race([t,r])},Hs=e=>!!e,Bs=function(){var e=r((function*(e,t,r){yield((e,t,r)=>zs((()=>((e,t,r)=>ds(us,e,t,r))(e,t,r))))(e,t,r);var n=yield Us(e,t);return yield Vs(n)}));return function(t,r,n){return e.apply(this,arguments)}}();class Ks{constructor(e,t,r,n){i(this,"config",void 0),i(this,"compassSDK",void 0),i(this,"synchronizer",void 0),i(this,"consentSDK",void 0),i(this,"executionData",void 0),i(this,"deferred",void 0);var o=e.experiences||e.flowcards;this.compassSDK=t,this.synchronizer=r,this.consentSDK=n,this.config={accountId:e.accountId,targeting:{}},o&&Object.assign(this.config,o),this.deferred=new fs,this.executionData=this.loadExperiences(),this.trackPayment()}trackPayment(){var e=this;return r((function*(){yield ga(),e.compassSDK.trackPaymentMethod()}))()}loadExperiences(){var e=this;return r((function*(){p(l.LOADING_EXPERIENCES);var t,n,i,o,a,s,c,u={},d=[],h={config:e.config,compassSDK:e.compassSDK,consentSDK:e.consentSDK},{active:m,clientParameters:v,preflight:g}=yield(t=e.config,t.preflight?(t.preflight.active=t.preflight.active||!!li(new URL(window.location.href)),Promise.resolve(t.preflight)):function(e){return(e=>fo(e,"https://flowcards.mrf.io/json/active",new Set(["sid","ptch","debug_experiences"])))(e).then(fetch).then((e=>e.json())).then((e=>e.preflight?mo(mo({},e),{},{preflight:vo(e.preflight)}):e))}({location:new URL(window.location.toString()),siteId:t.accountId,pageTechnology:0})),y=Promise.resolve();if(g){var b=yield Bs(g,h,e.synchronizer);u=Yn()(u,b),y=((e,t,r)=>zs((()=>ps(e,t,r))))(b,h,e.synchronizer).then((e=>{Array.isArray(e)&&d.push(...e);var[t]=d.filter((e=>"compass"===(null==e?void 0:e.handlerName)));(null==t||!t.handled)&&h.compassSDK.setRecirculationConfig({})}))}if(m){yield(n=e.config,i=e.deferred,null!==(o=n.waitFor)&&void 0!==o&&o.promise?n.waitFor.promise:null!==(a=n.waitFor)&&void 0!==a&&a.timeout?(c=n.waitFor.timeout,new Promise((e=>{setTimeout(e,c)}))):null!==(s=n.waitFor)&&void 0!==s&&s.done?i.promise:Promise.resolve()),yield function(e,t){return Yo.apply(this,arguments)}(e.config,e.compassSDK);var w=yield ta(e.config,e.compassSDK,v).then(function(){var t=r((function*(t){var r=yield Bs(t,h,e.synchronizer);return u=Yn()(u,r),((e,t,r)=>ps(e,t,r))(r,h,e.synchronizer)}));return function(e){return t.apply(this,arguments)}}());Array.isArray(w)&&d.push(...w)}yield y;var O=d.filter(Hs).reduce(((e,t)=>Fs(Fs({},e),{},{[t.handlerName]:e[t.handlerName]||t.handled})),{});return Object.values(ei).forEach((t=>{e.synchronizer.resolve(t,!!O[t])})),f(l.LOADING_EXPERIENCES,l.END_LOADING_EXPERIENCES),{handled:O,experiences:u}}))()}done(){this.deferred.resolve()}addTargeting(e,t){this.config.targeting[e]=t}addExperience(e,t){var r,n,i,o;null!==(n=(r=this.config).experiences)&&void 0!==n||(r.experiences={}),null!==(o=(i=this.config.experiences)[e])&&void 0!==o||(i[e]=[]),this.config.experiences[e].push(t)}addEventListener(e,t,r){var n=function(e,t){return"navigationchange"===e?e=>{t(e)}:"navigationfromcard"===e?Zo(t,"host"):"navigationtocard"===e?Zo(t,"flowcards"):null}(t,r);n&&sa(e).addEventListener("navigationchange",n)}hasExperiences(e){return this.executionData.then((t=>{var{handled:r}=t;return!!r[e]}))}triggerExperiences(){var e=this;return r((function*(){return e.loadExperiences()}))()}hasExperimentation(e){return this.executionData.then((t=>{var{experiences:r}=t;return((e,t)=>{var r,n=null===(r=e.experimentation)||void 0===r?void 0:r.actions;return!!n&&Object.values(n).some((e=>{var{url:r}=e;return-1!==r.indexOf("experimentType=".concat(t))}))})(r,e)}))}getRecommendations(e){var t=this;return r((function*(){return yield function(e){return xo.apply(this,arguments)}({experienceId:e,canonical:t.compassSDK.getCanonical(),userId:t.compassSDK.getUserId().actualUserId})}))()}}m("experiences",["compass","synchronizer","consent"],(()=>Promise.resolve(Ks)));class Gs{constructor(e,t){i(this,"croupier",void 0),this.croupier=t}addTargeting(e,t){this.croupier.addTargeting(e,t)}addCard(e){this.croupier.addExperience(ei.FLOWCARDS,e)}addEventListener(e,t){this.croupier.addEventListener(ei.FLOWCARDS,e,t)}hasCards(){return this.croupier.hasExperiences(ei.FLOWCARDS)}}function Js(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xs(e){for(var t=1;tPromise.resolve(Gs))),m("multimedia",["compass","consent","synchronizer"],function(){var e=r((function*(e,t){var r,n,i,[o,s,c]=t;return yield O(Xs(Xs({},e),{},{blockOnNoConsent:!(null===(r=e.multimedia)||void 0===r||!r.providers)&&-1!==(null===(n=e.multimedia)||void 0===n||null===(i=n.providers)||void 0===i?void 0:i.indexOf("youtube"))||e.blockOnNoConsent}),s,c),e.multimedia?a.e(492).then(a.bind(a,492)).then((e=>e.default)):Promise.reject()}));return function(t,r){return e.apply(this,arguments)}}());class Ws{constructor(){i(this,"promises",void 0),this.promises={}}wait(e){var t,r;null!==(r=(t=this.promises)[e])&&void 0!==r||(t[e]={});var n=this.promises[e].promise;return void 0===n?(n=new Promise(((t,r)=>{this.promises[e].resolve=t,this.promises[e].reject=r})),this.promises[e].promise=n,n):n}resolve(e,t){var r,n;null!==(n=(r=this.promises)[e])&&void 0!==n||(r[e]={}),void 0===this.promises[e].resolve?this.promises[e].promise=Promise.resolve(t):(0,this.promises[e].resolve)(t)}reject(e,t){var r,n;null!==(n=(r=this.promises)[e])&&void 0!==n||(r[e]={}),void 0===this.promises[e].reject?this.promises[e].promise=Promise.reject(t):(0,this.promises[e].reject)(t)}}m("synchronizer",[],(()=>Promise.resolve(Ws)));let Qs=()=>({emit(e,...t){for(let r=0,n=this.events[e]||[],i=n.length;r{this.events[e]=this.events[e]?.filter((e=>t!==e))}}});function Zs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $s(e){for(var t=1;t{"click"===e.t?null==t||t(e):setTimeout((()=>{null==t||t(e)}),0)}))}emitRecirculation(e){var t=function(e){return{t:Ys[e.t],m:e.m}}(e),r=function(e){return e.m.reduce(((t,r)=>{var n=r.n;if(n.startsWith("FC_")||n.startsWith("IL_")){var i,o=n.startsWith("IL_")?"inline":"flowcards";return $s($s({},t),{},{["recirculation:".concat(o)]:{t:e.t,m:[...(null===(i=t["recirculation:".concat(o)])||void 0===i?void 0:i.m)||[],r]},["recirculation:".concat(n)]:{t:e.t,m:[r]}})}return $s($s({},t),{},{["recirculation:".concat(n)]:{t:e.t,m:[r]}})}),{})}(t);this.emitter.emit("recirculation",t),Object.keys(r).forEach((e=>{this.emitter.emit(e,r[e])}))}}m("events",[],(()=>Promise.resolve(ec)));var tc=(e,t,r)=>{var n,i;n=((e,t,r)=>{var n=document.createElement("script");return n.src=e,n.id=r,t?n.type="module":n.setAttribute("nomodule",""),n})(e,r,t),i=document.body,new Promise(((e,t)=>{n.addEventListener("error",(e=>t(e.error))),i.append(n)}))},rc="https://sdk.mrf.io/statics",nc={ecommerce:{srcModule:"".concat(rc,"/compass-ecommerce-sdk.js"),srcNoModule:"".concat(rc,"/compass-ecommerce-sdk.es5.js"),dependencies:["compass"]},multimedia:{srcModule:"".concat(rc,"/compass-multimedia-sdk.js"),srcNoModule:"".concat(rc,"/compass-multimedia-sdk.es5.js"),dependencies:["compass"]}},ic=e=>"".concat(e,"?version=885");class oc{load(e,t){var r=nc[e];t&&function(){h.addConfig(...arguments)}(t),tc(ic(r.srcModule),e,!0),tc(ic(r.srcNoModule),e,!1)}}m("loader",[],(()=>Promise.resolve(oc)))})();